You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
When making a request to the route /api/num/{number} with a parameter like /api/num/s-1.2e-3, the server returns a 500 Internal Server Error instead of the expected 404 Not Found.
The URL /api/num/s-1.2e-3 should not match the route /api/num/ since it starts with s and is not a valid double. However, the server currently throws a 500 Internal Server Error.
And here is the log:
20241201 04:41:45.637000 UTC 37404 ERROR Unhandled exception in /api/num/s-1.2e-3, what(): invalid stod argument - HttpAppFrameworkImpl.cc:124
To Reproduce
Steps to reproduce the behavior:
Set up a Drogon server with the following handler registration:
Expected behavior
I expected the server to return a 404 Not Found error, as the parameter s-1.2e-3 is not a valid double (it starts with s and cannot be parsed as a number). The server should not attempt to match the route when the parameter is invalid.
Screenshots
Desktop (please complete the following information):
OS: Windows 11
Compiler: Visual Studio 2022
C++ Standard: C++17
Drogon version: 1.9.6
Charset: Unicode
Additional context
The text was updated successfully, but these errors were encountered:
Describe the bug
When making a request to the route /api/num/{number} with a parameter like /api/num/s-1.2e-3, the server returns a 500 Internal Server Error instead of the expected 404 Not Found.
The URL /api/num/s-1.2e-3 should not match the route /api/num/ since it starts with s and is not a valid double. However, the server currently throws a 500 Internal Server Error.
And here is the log:
To Reproduce
Steps to reproduce the behavior:
Expected behavior
I expected the server to return a 404 Not Found error, as the parameter s-1.2e-3 is not a valid double (it starts with s and cannot be parsed as a number). The server should not attempt to match the route when the parameter is invalid.
Screenshots
Desktop (please complete the following information):
Additional context
The text was updated successfully, but these errors were encountered: