Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
dms3
go-pinning-service-http-client
Commits
450a21fe
Commit
450a21fe
authored
Nov 17, 2020
by
Adin Schmahmann
Committed by
Marcin Rataj
Nov 30, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
refactor: properly return non-GenericOpenAPIErrors
parent
390a4c0e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
client.go
client.go
+1
-1
No files found.
client.go
View file @
450a21fe
...
@@ -371,7 +371,7 @@ func httperr(resp *http.Response, e error) error {
...
@@ -371,7 +371,7 @@ func httperr(resp *http.Response, e error) error {
if
ok
{
if
ok
{
ferr
,
ok
:=
oerr
.
Model
()
.
(
openapi
.
Failure
)
ferr
,
ok
:=
oerr
.
Model
()
.
(
openapi
.
Failure
)
if
ok
{
if
ok
{
return
errors
.
Wrapf
(
e
,
"statusCode: %d, reason
: %q, details
: %q"
,
resp
.
StatusCode
,
ferr
.
Error
.
GetReason
(),
ferr
.
Error
.
GetDetails
())
return
errors
.
Wrapf
(
e
,
"statusCode: %d, reason: %q, details: %q"
,
resp
.
StatusCode
,
ferr
.
Error
.
GetReason
(),
ferr
.
Error
.
GetDetails
())
}
}
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment