Improve Error Handling #351

Merged
techknowlogick merged 6 commits from 6543/go-sdk:impruve-error-handling into master 2020-07-08 17:21:48 +00:00
Owner

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 2020-05-27 12:22:59 +00:00
6543 added the
kind/enhancement
label 2020-05-27 12:22:59 +00:00
6543 added 1 commit 2020-05-27 12:23:02 +00:00
if 500 error has ErrMsg return this else return request witch was made
All checks were successful
continuous-integration/drone/pr Build is passing
99fb8a6e7f
6543 added 1 commit 2020-05-29 00:28:56 +00:00
Merge branch 'master' into impruve-error-handling
All checks were successful
continuous-integration/drone/pr Build is passing
b2b2fda865
jolheiser requested changes 2020-06-03 17:50:31 +00:00
Dismissed
jolheiser left a comment
Owner

Nit regarding copy/paste

Nit regarding copy/paste
gitea/client.go Outdated
@ -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 {
Owner

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?
Author
Owner

if statement is, rest not

if statement is, rest not
Author
Owner

@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 2020-06-04 10:01:26 +00:00
Merge branch 'master' into impruve-error-handling
All checks were successful
continuous-integration/drone/pr Build is passing
2574e4afe6
zeripath approved these changes 2020-06-10 13:41:34 +00:00
Dismissed
6543 added 5 commits 2020-07-08 14:52:29 +00:00
Add Function to get GetGlobalSettings and GetSettingAllowedReactions (#359)
Add Function to get GetGlobalSettings and GetSettingAllowedReactions

Co-authored-by: 6543 <6543@obermui.de>
Reviewed-on: #359
Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com>
Reviewed-by: techknowlogick <techknowlogick@gitea.io>
All checks were successful
continuous-integration/drone/push Build is passing
9be8754fec
CreateLabel correct Color if needed for old versions (#365)
Merge branch 'master' into CreateLabel_correct-format-for-old-intances

CreateLabel correct Color if needed for old versions

Co-authored-by: 6543 <6543@obermui.de>
Reviewed-on: #365
Reviewed-by: techknowlogick <techknowlogick@gitea.io>
Reviewed-by: Andrew Thornton <art27@cantab.net>
All checks were successful
continuous-integration/drone/push Build is passing
6a00d39ee1
File Create/Update/Delete detect DefaultBranch if Branch not set for old Versions (#352)
Gitea >= 1.12.0 Use DefaultBranch on "", mimic this for older versions

Co-authored-by: 6543 <6543@obermui.de>
Reviewed-on: #352
Reviewed-by: techknowlogick <techknowlogick@gitea.io>
Reviewed-by: Andrew Thornton <art27@cantab.net>
All checks were successful
continuous-integration/drone/push Build is passing
7f50d48c01
Add Validate func for Create/Edit Options (#370)
add TestLabels TEST

fix ...

impruve CreatePullReviewOptions Validate

some code refactor & reformat

add Validate functions where it make sence

add Validate() for CreateLabelOption

rm ToDo - not needed

Co-authored-by: 6543 <6543@obermui.de>
Reviewed-on: #370
Reviewed-by: techknowlogick <techknowlogick@gitea.io>
Reviewed-by: Andrew Thornton <art27@cantab.net>
All checks were successful
continuous-integration/drone/push Build is passing
5d880baff1
Merge branch 'master' into impruve-error-handling
Some checks reported errors
continuous-integration/drone/pr Build was killed
8a219d2270
6543 added 1 commit 2020-07-08 15:00:12 +00:00
dedub
Some checks failed
continuous-integration/drone/pr Build is failing
95a881223b
Author
Owner

@jolheiser did a dedub

@jolheiser did a dedub
6543 requested review from jolheiser 2020-07-08 15:01:21 +00:00
jolheiser approved these changes 2020-07-08 15:03:31 +00:00
Dismissed
6543 added 1 commit 2020-07-08 17:04:30 +00:00
ajust test for new gitea responce
All checks were successful
continuous-integration/drone/pr Build is passing
f6c2aa9690
Author
Owner

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 2020-07-08 17:13:21 +00:00
techknowlogick merged commit 27b4fdd986 into master 2020-07-08 17:21:44 +00:00
6543 deleted branch impruve-error-handling 2020-07-08 17:29:53 +00:00
Author
Owner

Backport: #377

Backport: #377
6543 added the
has/backport
label 2020-07-08 17:33:06 +00:00
6543 changed title from Impruve Error Handling to Improve Error Handling 2020-09-15 17:00:49 +00:00
Sign in to join this conversation.
No description provided.