Initialize an `UnauthenticatedError`. Args; details: Optional public, user-facing error message, as a string or any value that can be converted to string, or `None` to omit details. challenge: String value of the `WWW-Authenticate` HTTP header
(self, details=None, *, challenge)
| 92 | http_code = 401 |
| 93 | |
| 94 | def __init__(self, details=None, *, challenge): |
| 95 | """Initialize an `UnauthenticatedError`. |
| 96 | |
| 97 | Args; |
| 98 | details: Optional public, user-facing error message, as a |
| 99 | string or any value that can be converted to string, or |
| 100 | `None` to omit details. |
| 101 | challenge: String value of the `WWW-Authenticate` HTTP header |
| 102 | as described in RFC 7235. |
| 103 | """ |
| 104 | msg = _format_message("Unauthenticated", details) |
| 105 | super().__init__(msg) |
| 106 | self.headers.append(("WWW-Authenticate", challenge)) |
| 107 | |
| 108 | |
| 109 | class PermissionDeniedError(PublicError): |
nothing calls this directly
no test coverage detected