You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add more failure attributes and specific errors (#21)
1. Add `cause` and `stackTrace` attributes to `Failure`
2. Document `HandlerError`
3. Document `OperationError`
4. Add the `CONFLICT` handler error type
5. Add the `REQUEST_TIMEOUT` handler error type
6. Remove mentions of response codes that are covered by handler error
types
7. Deprecate the `Nexus-Request-Retryable` and `Nexus-Operation-State`
headers since this information should be present in the response body.
| `BAD_REQUEST` | 400 | The handler cannot or will not process the request due to an apparent client error. Clients should not retry this request unless advised otherwise. |
197
-
| `UNAUTHENTICATED` | 401 | The client did not supply valid authentication credentials for this request. Clients should not retry this request unless advised otherwise. |
198
-
| | | |
199
-
| `UNAUTHORIZED` | 403 | The caller does not have permission to execute the specified operation. Clients should not retry this request unless advised otherwise. |
200
-
| | | |
201
-
| `NOT_FOUND` | 404 | The requested resource could not be found but may be available in the future. Subsequent requests by the client are permissible but not advised. |
202
-
| | | |
203
-
| `RESOURCE_EXHAUSTED` | 429 | Some resource has been exhausted, perhaps a per-user quota, or perhaps the entire file system is out of space. Subsequent requests by the client are permissible. |
204
-
| `INTERNAL` | 500 | An internal error occured. Subsequent requests by the client are permissible. |
205
-
| `NOT_IMPLEMENTED` | 501 | The handler either does not recognize the request method, or it lacks the ability to fulfill the request. Clients should not retry this request unless advised otherwise. |
206
-
| `UNAVAILABLE` | 503 | The service is currently unavailable. Subsequent requests by the client are permissible. |
207
-
| `UPSTREAM_TIMEOUT` | 520 | Used by gateways to report that a request to an upstream handler has timed out. Subsequent requests by the client are permissible. |
| `BAD_REQUEST` | 400 | The handler cannot or will not process the request due to an apparent client error. Clients should not retry this request unless advised otherwise. |
237
+
| `UNAUTHENTICATED` | 401 | The client did not supply valid authentication credentials for this request. Clients should not retry this request unless advised otherwise. |
238
+
| `UNAUTHORIZED` | 403 | The caller does not have permission to execute the specified operation. Clients should not retry this request unless advised otherwise. |
239
+
| `NOT_FOUND` | 404 | The requested resource could not be found but may be available in the future. Subsequent requests by the client are permissible but not advised. |
240
+
| `REQUEST_TIMEOUT` | 408 | Returned by the server to when it has given up handling a request. The may occur by enforcing a client provided `Request-Timeout` or for any arbitrary reason such as enforcing some configurable limit. Subsequent requests by the client are permissible. |
241
+
| `CONFLICT` | 409 | The request could not be made due to a conflict. The may happen when trying to create an operation that has already been started. Clients should not retry this request unless advised otherwise. |
242
+
| `RESOURCE_EXHAUSTED` | 429 | Some resource has been exhausted, perhaps a per-user quota, or perhaps the entire file system is out of space. Subsequent requests by the client are permissible. |
243
+
| `INTERNAL` | 500 | An internal error occured. Subsequent requests by the client are permissible. |
244
+
| `NOT_IMPLEMENTED` | 501 | The handler either does not recognize the request method, or it lacks the ability to fulfill the request. Clients should not retry this request unless advised otherwise. |
245
+
| `UNAVAILABLE` | 503 | The service is currently unavailable. Subsequent requests by the client are permissible. |
246
+
| `UPSTREAM_TIMEOUT` | 520 | Used by gateways to report that a request to an upstream handler has timed out. Subsequent requests by the client are permissible. |
247
+
248
+
Client implementations should try to rehydrate a `HandlerError` from the serialized `Failure` object in the response
249
+
body whenever a request fails with one of the status codes listed below. If the handler error type in the `Failure`
250
+
object details doesn't match the response status code, the `Failure` object takes precendence.
251
+
252
+
If the serialized `Failure` does not represent a `HandlerError`, clients should construct a wrapper `HandlerError`,
253
+
setting the response `Failure` as the `cause` (if available) translating the response status code to the `HandlerError`
254
+
type and status text to the message.
208
255
209
256
## General Purpose Headers
210
257
@@ -220,7 +267,7 @@ Links must contain a `type` parameter that expresses how they should be parsed.
0 commit comments