Skip to content

Commit

Permalink
fix inconsistency
Browse files Browse the repository at this point in the history
Signed-off-by: Leo Valais <leo.valais97@gmail.com>
  • Loading branch information
leovalais committed Dec 2, 2024
1 parent 46336d8 commit ab758a5
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,7 @@ weight: 80
- Rely on `thiserror` everywhere.
- Keep the `trait EditoastError` but only implement it for errors defined in `views`.
- Since it is only used in `views` now, let's rename it to `trait ViewError`.
- Let's rename the macro to `derive(ViewError)` as well.
- Create a macro `derive(ViewError)` which interfaces with `derive(thiserror::Error)`. We can start from the former `derive(EditoastError)`.
- Create a proc-macro `derive(ViewError)` which interfaces with `derive(thiserror::Error)`.
- The `context` is empty by default but can be provided by the `impl ViewError`. The macro is also able to take context providers.
- `ViewError`'s `#[source]`, `#[from]`, `source` and `backtrace` fields are never serialized, unless explicitly provided. This shouldn't be the case as it exposes editoast internals at the API level.
- `derive(ViewError)` generates the `impl utoipa::ToSchema for T`.
Expand Down

0 comments on commit ab758a5

Please sign in to comment.