#351 Impruve Error Handling

Merged
techknowlogick merged 6 commits from 6543/go-sdk:impruve-error-handling into master 12 hours ago
6543 commented 1 month ago

If 500 error has ErrMsg return this else return request witch was made

close #304

If 500 error has ErrMsg return this else return request witch was made close #304
6543 added this to the v0.12.1 milestone 1 month ago
6543 added the
kind/enhancement
label 1 month ago
6543 added 1 commit 1 month ago
6543 added 1 commit 1 month ago
jolheiser requested changes 1 month ago
jolheiser left a comment

Nit regarding copy/paste

gitea/client.go
@ -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 {
jolheiser commented 1 month ago

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?

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?
6543 commented 1 month ago

if statement is, rest not

if statement is, rest not
6543 commented 1 month ago

@jolheiser I think this is to less code to make a own function - it would just make code more complex

@jolheiser I think this is to less code to make a own function - it would just make code more complex
6543 added 1 commit 1 month ago
zeripath approved these changes 4 weeks ago
6543 added 5 commits 14 hours ago
9be8754fec Add Function to get GetGlobalSettings and GetSettingAllowedReactions (#359)
6a00d39ee1 CreateLabel correct Color if needed for old versions (#365)
7f50d48c01 File Create/Update/Delete detect DefaultBranch if Branch not set for old Versions (#352)
5d880baff1 Add Validate func for Create/Edit Options (#370)
6543 added 1 commit 14 hours ago
6543 commented 14 hours ago
Poster

@jolheiser did a dedub

@jolheiser did a dedub
6543 requested review from jolheiser 14 hours ago
jolheiser approved these changes 14 hours ago
6543 added 1 commit 12 hours ago
6543 commented 12 hours ago
Poster

last commit is unrelated but fix test (and so the CI) because gitea responce has changed ...

last commit is unrelated but fix test (and so the CI) because gitea responce has changed ...
6543 modified the milestone from v0.12.1 to v0.13.0 12 hours ago
techknowlogick merged commit 27b4fdd986 into master 12 hours ago
6543 deleted branch impruve-error-handling 11 hours ago
6543 commented 11 hours ago
Poster

Backport: #377

Backport: #377
6543 added the
has/backport
label 11 hours ago

Reviewers

zeripath approved these changes 4 weeks ago
jolheiser approved these changes 14 hours ago
The pull request has been merged as 27b4fdd986.
Sign in to join this conversation.
Loading…
There is no content yet.