Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
ollama
Commits
02524a56
Commit
02524a56
authored
Nov 19, 2023
by
Jeffrey Morgan
Browse files
check retry for authorization error
parent
1657c6ab
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
1 deletion
+8
-1
server/images.go
server/images.go
+8
-1
No files found.
server/images.go
View file @
02524a56
...
...
@@ -1131,6 +1131,7 @@ func makeRequestWithRetry(ctx context.Context, method string, requestURL *url.UR
if
!
errors
.
Is
(
err
,
context
.
Canceled
)
{
log
.
Printf
(
"request failed: %v"
,
err
)
}
return
nil
,
err
}
...
...
@@ -1150,7 +1151,13 @@ func makeRequestWithRetry(ctx context.Context, method string, requestURL *url.UR
return
nil
,
err
}
}
return
makeRequest
(
ctx
,
method
,
requestURL
,
headers
,
body
,
regOpts
)
resp
,
err
:=
makeRequest
(
ctx
,
method
,
requestURL
,
headers
,
body
,
regOpts
)
if
resp
.
StatusCode
==
http
.
StatusUnauthorized
{
return
nil
,
errUnauthorized
}
return
resp
,
err
case
resp
.
StatusCode
==
http
.
StatusNotFound
:
return
nil
,
os
.
ErrNotExist
case
resp
.
StatusCode
>=
http
.
StatusBadRequest
:
...
...
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