Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve database error classification #1317

Merged
merged 2 commits into from
May 16, 2024

Conversation

svix-jplatte
Copy link
Member

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.

@svix-jplatte svix-jplatte requested a review from a team as a code owner May 15, 2024 15:00
svix-james
svix-james previously approved these changes May 15, 2024
@svix-jplatte svix-jplatte merged commit f096f73 into main May 16, 2024
5 checks passed
@svix-jplatte svix-jplatte deleted the jplatte/db-error-classification branch May 16, 2024 14:26
svix-lucho added a commit that referenced this pull request Jul 11, 2024
## What's Changed
* Enable redis `tcp_nodelay` by @jaymell in
#1316
* server: Simplify short-circuiting logic for Option::None by
@svix-jplatte in #1318
* Improve database error classification by @svix-jplatte in
#1317
* server: Remove unwraps in redis queue module by @svix-jplatte in
#1319
* Improve error message by @jaymell in
#1320
* Update OpenAPI spec and regenerate libs by @svix-lucho in
#1321
* Add NullableBool function by @dacohen in
#1322
* bridge: Upgrade omniqueue and related dependencies by @svix-jplatte in
#1326
* Make config type, variant names less confusing by @svix-jplatte in
#1327
* Redis updates by @jaymell in
#1328
* More redis updates by @jaymell in
#1329
* bridge: More config cleanup by @svix-jplatte in
#1330
* Python: update deps and switch to ruff. by @tasn in
#1332
* bridge: Update Cargo.lock by @svix-jplatte in
#1334
* Bump locked dependencies again by @svix-jplatte in
#1336
* server: Update Cargo.lock by @svix-jplatte in
#1337
* build(deps): bump braces from 3.0.2 to 3.0.3 in /javascript by
@dependabot in #1335
* bridge: Add Kafka as an input by @svix-jplatte in
#1333
* rust: Add Svix::background_task by @svix-jplatte in
#1341
* bridge: Reduce deno dependencies by @svix-jplatte in
#1343
* rust: Add `Svix::with_token` to allow changing api token by
@svix-aaron1011 in #1339
* build(deps): bump ws from 7.4.6 to 7.5.10 in /javascript by
@dependabot in #1338
* bridge: Upgrade wiremock dev-dependency by @svix-jplatte in
#1344
* bridge: Error refactoring by @svix-jplatte in
#1342
* bridge: Add kafka receiver output by @svix-jplatte in
#1345
* bridge: Cargo manifest cleanup by @svix-jplatte in
#1346
* bridge: Remove build step from CI workflow by @svix-jplatte in
#1347
* Fix `Recover Failed Webhooks` response by @jaymell in
#1349
* Libs(Go): adjust Go linter by @svix-onelson in
#1351
* Libs(Go): pluralize GO_MODULES in superlinter by @svix-onelson in
#1353
* build(deps): bump golang.org/x/net from 0.17.0 to 0.23.0 by
@dependabot in #1294
* `Recover Failed Webhooks` use configurable `until` by @jaymell in
#1352
* Update comments in KafkaConsumer by @svix-jplatte in
#1354
* Replace ctype_digit for PHP 8.1 deprecation of non-string arguments by
@jterry in #1355
* CI: add something to run php tests by @svix-onelson in
#1356
* js: Apply workaround for incomplete fetch support in Cloudflare Worker
by @svix-jplatte in #1359
* Bump certifi from 2023.07.22 to 2024.7.4 in /python by @svix-jplatte
in #1358
* ci: Update GitHub actions revs for php-ci by @svix-jplatte in
#1360
* build(deps): bump zerovec from 0.10.2 to 0.10.4 in /server by
@dependabot in #1361
* Server: bump zerovec-derive by @svix-onelson in
#1362
* bridge: Add kafka to example configs, config tests by @svix-jplatte in
#1357
* Libs: bump spec by @svix-onelson in
#1366

## New Contributors
* @dacohen made their first contribution in
#1322
* @jterry made their first contribution in
#1355

**Full Changelog**:
v1.24.0...v1.25.0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants