Refactor error handling #295
Labels
No Label
kind/breaking
kind/bug
kind/build
kind/dependency
kind/deployment
kind/docs
kind
enhancement
kind
feature
kind/proposal
kind
question
kind
refactor
kind/security
kind/testing
kind/translation
priority/critical
priority/high
priority/low
priority/medium
reviewed/duplicate
reviewed/invalid
reviewed/wontfix
skip-changelog
status/blocked
status/has-backport
status/has-pull
status/needs-backport
status/needs-feedback
status/needs-reviews
status/wip
upstream/gitea
upstream/sdk
No Milestone
No Assignees
2 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: gitea/tea#295
Loading…
Reference in New Issue
Block a user
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?
There's quite a lot of
log.Fatal()
in the code base, even though we have facilities to pass errors all the way up.We should have a single error handler.
While at it, we can introduce proper error codes (at least for common cases like 404 etc).
urfave/cli has facilities for this (
cli.Exit(msg, code)
).Question is: Is it okay to introduce
cli
dependency inmodules/tasks
for this? @6543I'm not a fan of that ...
but we could intorduce a custom error, to pass throug the code & msg