-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This PR extends errors to allow users of the SDK to set the details json object. The PR also implements `IntoResponse` for all the error types, so they can be returned directly from their respective routes. This means the routes.rs file is removed. Note we add a `fetch_metrics` function, this contains the logic that used to live in the respective route (this was the only route with logic). Before merging, I'll move all the error types into their own file, but wanted to keep them as-is for now, so it's easier to see what changed/stayed the same. You may notice the `IntoResponse` implementation does _not_ use the `to_string` method on the error types to add the prefix to the message. This is intentional, that information is conveyed with the status code.
- Loading branch information
1 parent
29adcb5
commit f4f6502
Showing
7 changed files
with
585 additions
and
537 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
Oops, something went wrong.