diff --git a/src/libraries/System.Text.Json/src/System/Text/Json/Serialization/Converters/Value/VersionConverter.cs b/src/libraries/System.Text.Json/src/System/Text/Json/Serialization/Converters/Value/VersionConverter.cs index ed07581ded9af..c3e60ab0448d3 100644 --- a/src/libraries/System.Text.Json/src/System/Text/Json/Serialization/Converters/Value/VersionConverter.cs +++ b/src/libraries/System.Text.Json/src/System/Text/Json/Serialization/Converters/Value/VersionConverter.cs @@ -37,7 +37,7 @@ private static Version ReadCore(ref Utf8JsonReader reader) #if NETCOREAPP if (!JsonHelpers.IsInRangeInclusive(reader.ValueLength, MinimumVersionLength, MaximumEscapedVersionLength)) { - ThrowHelper.ThrowFormatException(DataType.TimeSpan); + ThrowHelper.ThrowFormatException(DataType.Version); } Span charBuffer = stackalloc char[MaximumEscapedVersionLength];