Improve handling of errors #39
Labels
No Label
Brainstorm
Parent
bug
duplicate
enhancement
help wanted
idea
invalid
project/backend
project/frontend
question
wontfix
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
No due date set.
Blocks
#11 Ivago: invalid parameters also return 404
Chewing_Bever/fej
Reference: Chewing_Bever/fej#39
Loading…
Reference in New Issue
There is no content yet.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may exist for a short time before cleaning up, in most cases it CANNOT be undone. Continue?
At the moment, we just convert every type of error into a
FejErrorobject, but this approaches isn't as flexible when it comes to defining verbose error messages.As an alternative, could define
FejErrorlike this:We can then define a
From<reqwest::Error> for Statusfor each wrapped type (reqwest::Erroris just an example here). This way, we have full control over what each error represents when returning a Status.As a bonus, we can practice writing macros, as this looks like a prime example.
Inspiration for this approach