pub fn http_status_for_sys(sys: u16) -> u16Expand description
Map a system error code (u16) to an HTTP status code (u16). Suggested contract:
- 404xx -> 404
- 422xx -> 422
- 204xx -> 204
- 499xx -> 499 (Client Closed Request) or 503; we choose 499 to distinguish
- 502xx -> 502
- 503xx -> 503
- 500xx -> 500
- else -> 500