Answer 502 for an upstream host with no address or a failed fetch (closes #367)
check / check (push) Canceled after 0s
check / check (push) Canceled after 0s
The image routes answered 500 and logged at error level when the upstream host had no address, when the fetch failed before the upstream answered, such as on a refused connection, or when the fetcher refused a redirect. The fetcher now marks such a failure with ErrUpstreamRequestFailed; a cancelled fetch is not marked. respondImageError answers it, and ErrInvalidHost, 502 "upstream error" and logs them at warn level. A timeout that does not match context.DeadlineExceeded, such as the TLS handshake timeout, is now ErrUpstreamTimeout and answers 504. README Routes lists these answers. Model: opus-5-5
This commit is contained in:
1 parent
9bccaaf85a
commit
81715cefac
5 files changed
+133
-7
No files matched your search
@@ -337,8 +337,15 @@ to any method the list does not give for it.
|
||||
neither the image nor its source in its cache.
|
||||
- 502 likewise for 5 minutes after a body whose first bytes are not those of
|
||||
its `Content-Type`.
|
||||
- 502 when the upstream host, or a host it redirects to, has no address.
|
||||
- 502 when the upstream redirects to a URL that is not `https`, or redirects
|
||||
10 times.
|
||||
- 502 when the fetch fails before the upstream answers, such as on a refused
|
||||
connection or a failed TLS handshake.
|
||||
- 503 when pixa is busy (see Limits).
|
||||
- 503 in maintenance mode.
|
||||
- 504 when the upstream has not finished the TLS handshake within 10
|
||||
seconds.
|
||||
- 504 when the upstream has not sent its response headers within
|
||||
`upstream_fetch_timeout`.
|
||||
- 500 when that time runs out while the image itself is still arriving.
|
||||
|
||||
Reference in new issue
Block a user