fix(14.2-03): access log records a cancelled request's 5xx as 499
A client that goes away mid-request cancels the context; a handler then fails on context.Canceled and writes a 500 nobody receives. The request log now records it as 499 (client closed request) so a grep for 5xx shows real server errors only.
This commit is contained in:
@@ -60,7 +60,7 @@ Each request then writes one Info record with the message `http request` once it
|
||||
|-----------|-------|
|
||||
| `method` | The request method. |
|
||||
| `pattern` | The matched route, method and path pattern, for example `GET /posts/{id}`. Empty when no route matched. |
|
||||
| `status` | The response status; a handler that writes without setting one counts as 200. |
|
||||
| `status` | The response status; a handler that writes without setting one counts as 200. A 5xx written after the client cancelled the request is logged as 499 (client closed request), since the error came from the cancellation and no client received it. |
|
||||
| `duration_ms` | Time spent serving the request, in whole milliseconds. |
|
||||
| `path` | Only when no route matched (a 404 or 405 from the router, or a CORS preflight answered before routing): the URL path without the query string. |
|
||||
|
||||
|
||||
Reference in New Issue
Block a user