Improve Error Handling #351
No reviewers
Labels
No Label
has/backport
has/pull
in progress
invalid
kind/breaking
kind/bug
kind/build
kind/deployment
kind/docs
kind/enhancement
kind/feature
kind/lint
kind/proposal
kind/question
kind/refactor
kind/security
kind/testing
kind/translation
kind/ui
need/backport
priority/critical
priority/low
priority/maybe
priority/medium
reviewed/duplicate
reviewed/invalid
reviewed/wontfix
skip-changelog
status/blocked
status/needs-feedback
status/needs-reviews
status/wip
upstream/gitea
No Milestone
No Assignees
3 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: gitea/go-sdk#351
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "6543/go-sdk:impruve-error-handling"
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?
If 500 error has ErrMsg return this else return request witch was made
close #304
Nit regarding copy/paste
@ -121,3 +123,3 @@
return nil, fmt.Errorf("422 Unprocessable Entity: %s", string(data))
case 500:
return nil, fmt.Errorf("500 Internal Server Error, request: '%s' with '%s' method and '%s' header", path, method, header)
if err = json.Unmarshal(data, &errMap); err != nil {
Since this appears to be the same code as below, is there any way we can make a func for it or otherwise combine them to de-duplicate?
if statement is, rest not
@jolheiser I think this is to less code to make a own function - it would just make code more complex
@jolheiser did a dedub
last commit is unrelated but fix test (and so the CI) because gitea responce has changed ...
Backport: #377
Impruve Error Handlingto Improve Error Handling