Right now, internal server errors are propagated until they are blindly .unwrap()ed in the top level request function, which is annoying for a number of reasons:
- End users get a "connection reset" error when they shouldn't
- Users can't properly handle internal errors and have to resort to checking stdout (not even a log file!)
- It's unclear what's causing the error for a developer: as even the logged error in stdout doesn't have a backtrace (and
RUST_BACKTRACE=1 backtraces are too big)
The main problem is that either cassandra_cpp::Result or generic error reporting libraries like anyhow or error_stack aren't thread-safe, making it impossible to use in the server.
Right now, internal server errors are propagated until they are blindly
.unwrap()ed in the top level request function, which is annoying for a number of reasons:RUST_BACKTRACE=1backtraces are too big)The main problem is that either
cassandra_cpp::Resultor generic error reporting libraries likeanyhoworerror_stackaren't thread-safe, making it impossible to use in the server.