-
Notifications
You must be signed in to change notification settings - Fork 172
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve database error classification (#1317)
## Motivation Currently, turning `sea_orm::DbErr` into `svix_server::Error` and turning that error into a response gets us an internal server error. For many kinds of database errors, we can actually return a more useful status code (and an error message). ## Solution Assign more meaningful HTTP status codes and error messages to some DB errors.
- Loading branch information
Showing
2 changed files
with
148 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters