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
Recently, an application made with Poem crashed when sending JSON responses.
I investigated and found the cause:
thread 'tokio-runtime-worker' panicked at /home/XXXXX/.cargo/registry/src/index.crates.io-6f17d22XXXXXXX/poem-openapi-5.1.0/src/types/external/floats.rs:91:1:
there's an “unwrap()” in the code (src/types/external/floats.rs), the exception is not handled.
In a post about a year ago, I pointed out the presence of several unwrap() functions in the Poem project source code. The unwrap() / except() functions should never be used in production code.
several files in src/types/external/ contain unwrap() :
array.rs
bson.rs
float.rs
time.rs
Thank you for all your efforts behind this framework. 👍
Specifications
Version: 3.1.0
The text was updated successfully, but these errors were encountered:
Hello,
Recently, an application made with Poem crashed when sending JSON responses.
I investigated and found the cause:
thread 'tokio-runtime-worker' panicked at /home/XXXXX/.cargo/registry/src/index.crates.io-6f17d22XXXXXXX/poem-openapi-5.1.0/src/types/external/floats.rs:91:1:
It is this macro that is behind the exception :
analyzing the code generated by this macro, I find the culprit:
there's an “unwrap()” in the code (src/types/external/floats.rs), the exception is not handled.
In a post about a year ago, I pointed out the presence of several unwrap() functions in the Poem project source code. The unwrap() / except() functions should never be used in production code.
several files in src/types/external/ contain unwrap() :
Thank you for all your efforts behind this framework. 👍
Specifications
The text was updated successfully, but these errors were encountered: