Answer 502 for an upstream host with no address or a failed fetch (closes #367)
check / check (push) Waiting to run
check / check (push) Waiting to run
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, or when the fetcher refused a redirect. Such a failure is now ErrInvalidHost or ErrUpstreamRequestFailed, which respondImageError answers 502 "upstream error" and logs at warn level. A TLS handshake, an address lookup or a connection that times out is now ErrUpstreamTimeout and answers 504; its log line keeps the cause. A cancelled fetch or address lookup is neither ErrUpstreamRequestFailed nor ErrInvalidHost. README Routes lists these answers. Model: opus-5-5
This commit is contained in:
1 parent
b32077c380
commit
de546fa2e9
5 files changed
+301
-11
No files matched your search
@@ -337,8 +337,19 @@ 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 address lookup of the upstream host, or of a host it
|
||||
redirects to, times out.
|
||||
- 504 when the connection to the upstream host, or to a host it redirects
|
||||
to, times out.
|
||||
- 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