Skip to content
This repository has been archived by the owner on Jan 21, 2024. It is now read-only.

feat: better server-side errors #9

Merged
merged 1 commit into from
May 13, 2023
Merged

Conversation

luizirber
Copy link
Member

If a request with an incompatible signature is sent there is no feedback to the requester about what went wrong. This PR implements one fix (by returning error 400 and pointing what k is expected), but can be extended in the future.

@@ -29,4 +29,5 @@ tracing = "0.1"
tracing-subscriber = { version = "0.3", features = ["env-filter", "fmt", "json"] }

[profile.release]
debug = true
debug = 1
#lto = true # Enable link-time optimization
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Disabling this for now because it has errors with rocksdb 0.18 (due to bz_internal_error duplication when linking). It is already fixed (more info) but need to update sourmash-bio/sourmash#2230 to use the newer rocksdb version.

Comment on lines +66 to +70
environment: Some(
std::env::var("MASTIFF_ENVIRONMENT")
.unwrap_or("development".into())
.into(),
),
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sentry uses debug/release to decide if it is development/production, but rocksdb is very slow in debug mode. Making it explicit here and defaulting to development unless MASTIFF_ENVIRONMENT is defined (which it is in production).

@luizirber luizirber changed the title feat: better server errors feat: better server-side errors May 13, 2023
@luizirber luizirber force-pushed the lirber/better_errors_server branch from a85cc74 to 70eb3a1 Compare May 13, 2023 22:35
@luizirber luizirber merged commit 4dca464 into latest May 13, 2023
@luizirber luizirber deleted the lirber/better_errors_server branch May 13, 2023 22:54
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant