Error codes for data API requests
This commit is contained in:
+11
-4
@@ -512,9 +512,12 @@ path doesn't exist or is invalid.
|
|||||||
**Header**: `Content-Type: application/octet-stream`<br />
|
**Header**: `Content-Type: application/octet-stream`<br />
|
||||||
**Content**: The value of the resource. Note that it may be empty.
|
**Content**: The value of the resource. Note that it may be empty.
|
||||||
* **Error Responses**:
|
* **Error Responses**:
|
||||||
**Code**: `400 Invalid Resource Path`<br />
|
* **Code**: `400 Invalid Resource Path`<br />
|
||||||
**Notes**: Check the list of valid resource paths at the top of this section.
|
**Notes**: Check the list of valid resource paths at the top of this section.
|
||||||
* **Code**: `404 Not Found`
|
* **Code**: `404 Not Found`<br />
|
||||||
|
**Notes**: Refers to the handler resource itself.
|
||||||
|
* **Code**: `204 Resource Item Not Found`<br />
|
||||||
|
**Notes**: Refers to the named item in the corresponding data API resource.
|
||||||
* **Sample Call**:<br />
|
* **Sample Call**:<br />
|
||||||
```sh
|
```sh
|
||||||
$ curl /handlers/$KAPOW_HANDLER_ID/request/body
|
$ curl /handlers/$KAPOW_HANDLER_ID/request/body
|
||||||
@@ -532,8 +535,12 @@ path doesn't exist or is invalid.
|
|||||||
* **Success Responses**:
|
* **Success Responses**:
|
||||||
* **Code**: `200 OK`
|
* **Code**: `200 OK`
|
||||||
* **Error Responses**:
|
* **Error Responses**:
|
||||||
* **Code**: `400 Invalid Resource`
|
* **Code**: `400 Invalid Resource Path`<br />
|
||||||
* **Code**: `404 Not Found`
|
**Notes**: Check the list of valid resource paths at the top of this section.
|
||||||
|
* **Code**: `404 Not Found`<br />
|
||||||
|
**Notes**: Refers to the handler resource itself.
|
||||||
|
* **Code**: `204 Resource Item Not Found`<br />
|
||||||
|
**Notes**: Refers to the named item in the corresponding data API resource.
|
||||||
* **Sample Call**:<br />
|
* **Sample Call**:<br />
|
||||||
```sh
|
```sh
|
||||||
$ curl -X --data-binary '<h1>Hello!</h1>' PUT /handlers/$KAPOW_HANDLER_ID/response/body
|
$ curl -X --data-binary '<h1>Hello!</h1>' PUT /handlers/$KAPOW_HANDLER_ID/response/body
|
||||||
|
|||||||
Reference in New Issue
Block a user