Idiomatic error handling for requests #18
Labels
No labels
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: LBRYCommunity/wallet-sync-server#18
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Right now I have a weird thing where I have a function that checks for auth errors, and replies to the request with a json error and otherwise returns a token. I probably want to return an error, but I didn't want to have a lot of boilerplate in the handler.
I could probably create a new error type that automatically becomes a json. And a different variant for 500s, since the error should not be output to the user, but rather logs instead (as I do now but in a less idiomatic way).