Skip to content
Snippets Groups Projects
Commit 13908a95 authored by Travis Ralston's avatar Travis Ralston
Browse files

Internally fix developer errors on error responses

see 1168a7f6
parent 1168a7f6
No related branches found
No related tags found
No related merge requests found
...@@ -149,6 +149,9 @@ beforeParseDownload: ...@@ -149,6 +149,9 @@ beforeParseDownload:
} }
// Try to find a suitable error code, if one is needed // Try to find a suitable error code, if one is needed
if errRes, isError := res.(_responses.ErrorResponse); isError {
res = &errRes // just fix it
}
if errRes, isError := res.(*_responses.ErrorResponse); isError && proposedStatusCode == http.StatusOK { if errRes, isError := res.(*_responses.ErrorResponse); isError && proposedStatusCode == http.StatusOK {
switch errRes.InternalCode { switch errRes.InternalCode {
case common.ErrCodeUnknownToken: case common.ErrCodeUnknownToken:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment