From fe0de6fc1ba95fc9731f07fb17262a896bcaf22b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A9ctor=20Hurtado?= Date: Thu, 29 Aug 2019 12:52:46 +0200 Subject: [PATCH] Error codes for data API requests --- spec/README.md | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/spec/README.md b/spec/README.md index 96f995f..dcaa4f9 100644 --- a/spec/README.md +++ b/spec/README.md @@ -512,9 +512,12 @@ path doesn't exist or is invalid. **Header**: `Content-Type: application/octet-stream`
**Content**: The value of the resource. Note that it may be empty. * **Error Responses**: - **Code**: `400 Invalid Resource Path`
+ * **Code**: `400 Invalid Resource Path`
**Notes**: Check the list of valid resource paths at the top of this section. - * **Code**: `404 Not Found` + * **Code**: `404 Not Found`
+ **Notes**: Refers to the handler resource itself. + * **Code**: `204 Resource Item Not Found`
+ **Notes**: Refers to the named item in the corresponding data API resource. * **Sample Call**:
```sh $ curl /handlers/$KAPOW_HANDLER_ID/request/body @@ -532,8 +535,12 @@ path doesn't exist or is invalid. * **Success Responses**: * **Code**: `200 OK` * **Error Responses**: - * **Code**: `400 Invalid Resource` - * **Code**: `404 Not Found` + * **Code**: `400 Invalid Resource Path`
+ **Notes**: Check the list of valid resource paths at the top of this section. + * **Code**: `404 Not Found`
+ **Notes**: Refers to the handler resource itself. + * **Code**: `204 Resource Item Not Found`
+ **Notes**: Refers to the named item in the corresponding data API resource. * **Sample Call**:
```sh $ curl -X --data-binary '

Hello!

' PUT /handlers/$KAPOW_HANDLER_ID/response/body