csharp-web
csharp-web copied to clipboard
Error when parse to required type in function action declaration is not successful
Action is:
public HttpResponse Create(int range, ...)
{ ...
Test situation is:

Exception is:
System.FormatException: Input string was not in a correct format.
at System.Number.ThrowOverflowOrFormatException(ParsingStatus status, TypeCode type)
at System.String.System.IConvertible.ToInt32(IFormatProvider provider)
at System.Convert.ChangeType(Object value, Type conversionType, IFormatProvider provider)
at System.Convert.ChangeType(Object value, Type conversionType)
at SUS.MvcFramework.Host.ExecuteAction(HttpRequest request, Type controllerType, MethodInfo action, IServiceCollection serviceCollection) in C:\fakepath\SUS.MvcFramework\Host.cs:line 95
at SUS.MvcFramework.Host.<>c__DisplayClass1_2.<AutoRegisterRoutes>b__3(HttpRequest request) in C:\fakepath\SUS.MvcFramework\Host.cs:line 70
at SUS.HTTP.HttpServer.ProcessClientAsync(TcpClient tcpClient) in C:\fakepath\SUS.HTTP\HttpServer.cs:line 73
Probably should be set to default instead of throwing exception and resulting to:
