Fix status code API reference documentation to match code (#899) (#918)

This commit is contained in:
Charlie Stanley 2020-11-16 10:07:41 -08:00 committed by GitHub
parent d4012c8b3b
commit 60d4fd5afc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 54 additions and 49 deletions

View File

@ -27,7 +27,7 @@ Code | Description
---- | ----------- ---- | -----------
200 | Request successful 200 | Request successful
500 | Request failed 500 | Request failed
404 | Actor not found XXX | Status code from upstream call
#### URL Parameters #### URL Parameters
@ -84,7 +84,7 @@ POST/PUT http://localhost:<daprPort>/v1.0/actors/<actorType>/<actorId>/state
Code | Description Code | Description
---- | ----------- ---- | -----------
201 | Request successful 204 | Request successful
400 | Actor not found 400 | Actor not found
500 | Request failed 500 | Request failed
@ -208,9 +208,9 @@ To configure the reminder to fire once only, the period should be set to empty s
Code | Description Code | Description
---- | ----------- ---- | -----------
200 | Request successful 204 | Request successful
500 | Request failed 500 | Request failed
404 | Actor not found 400 | Actor not found or malformed request
#### URL Parameters #### URL Parameters
@ -251,7 +251,6 @@ Code | Description
---- | ----------- ---- | -----------
200 | Request successful 200 | Request successful
500 | Request failed 500 | Request failed
404 | Actor not found
#### URL Parameters #### URL Parameters
@ -295,9 +294,8 @@ DELETE http://localhost:<daprPort>/v1.0/actors/<actorType>/<actorId>/reminders/<
Code | Description Code | Description
---- | ----------- ---- | -----------
200 | Request successful 204 | Request successful
500 | Request failed 500 | Request failed
404 | Actor not found
#### URL Parameters #### URL Parameters
@ -349,9 +347,9 @@ A `dueTime` of 0 means to fire immediately. The following body means to fire im
Code | Description Code | Description
---- | ----------- ---- | -----------
200 | Request successful 204 | Request successful
500 | Request failed 500 | Request failed
404 | Actor not found 400 | Actor not found or malformed request
#### URL Parameters #### URL Parameters
@ -391,9 +389,8 @@ DELETE http://localhost:<daprPort>/v1.0/actors/<actorType>/<actorId>/timers/<nam
Code | Description Code | Description
---- | ----------- ---- | -----------
200 | Request successful 204 | Request successful
500 | Request failed 500 | Request failed
404 | Actor not found
#### URL Parameters #### URL Parameters

View File

@ -173,6 +173,8 @@ POST/PUT http://localhost:<daprPort>/v1.0/bindings/<name>
Code | Description Code | Description
---- | ----------- ---- | -----------
200 | Request successful 200 | Request successful
204 | Empty Response
400 | Malformed request
500 | Request failed 500 | Request failed
### Payload ### Payload

View File

@ -16,30 +16,32 @@ For http calls made to Dapr runtime, when an error is encountered, an error json
Following table lists the error codes returned by Dapr runtime: Following table lists the error codes returned by Dapr runtime:
| Error Code | Description | | Error Code | Description |
|----------------------------------|-------------| |-----------------------------------|-------------|
| ERR_ACTOR_INSTANCE_MISSING | Error getting an actor instance. This means that actor is now hosted in some other service replica. | ERR_ACTOR_INSTANCE_MISSING | Error getting an actor instance. This means that actor is now hosted in some other service replica.
| ERR_ACTOR_RUNTIME_NOT_FOUND | Error getting the actor instance. | ERR_ACTOR_RUNTIME_NOT_FOUND | Error getting the actor instance.
| ERR_ACTOR_REMINDER_CREATE | Error creating a reminder for an actor. | ERR_ACTOR_REMINDER_CREATE | Error creating a reminder for an actor.
| ERR_ACTOR_REMINDER_DELETE | Error deleting a reminder for an actor. | ERR_ACTOR_REMINDER_DELETE | Error deleting a reminder for an actor.
| ERR_ACTOR_TIMER_CREATE | Error creating a timer for an actor. | ERR_ACTOR_TIMER_CREATE | Error creating a timer for an actor.
| ERR_ACTOR_TIMER_DELETE | Error deleting a timer for an actor. | ERR_ACTOR_TIMER_DELETE | Error deleting a timer for an actor.
| ERR_ACTOR_REMINDER_GET | Error getting a reminder for an actor. | ERR_ACTOR_REMINDER_GET | Error getting a reminder for an actor.
| ERR_ACTOR_INVOKE_METHOD | Error invoking a method on an actor. | ERR_ACTOR_INVOKE_METHOD | Error invoking a method on an actor.
| ERR_ACTOR_STATE_DELETE | Error deleting the state for an actor. | ERR_ACTOR_STATE_DELETE | Error deleting the state for an actor.
| ERR_ACTOR_STATE_GET | Error getting the state for an actor. | ERR_ACTOR_STATE_GET | Error getting the state for an actor.
| ERR_ACTOR_STATE_TRANSACTION_SAVE | Error storing actor state transactionally. | ERR_ACTOR_STATE_TRANSACTION_SAVE | Error storing actor state transactionally.
| ERR_PUBSUB_NOT_FOUND | Error referencing the Pub/Sub component in Dapr runtime. | ERR_PUBSUB_NOT_FOUND | Error referencing the Pub/Sub component in Dapr runtime.
| ERR_PUBSUB_PUBLISH_MESSAGE | Error publishing a message. | ERR_PUBSUB_PUBLISH_MESSAGE | Error publishing a message.
| ERR_PUBSUB_CLOUD_EVENTS_SER | Error serializing Pub/Sub event envelope. | ERR_PUBSUB_CLOUD_EVENTS_SER | Error serializing Pub/Sub event envelope.
| ERR_STATE_STORE_NOT_FOUND | Error referencing a state store not found. | ERR_STATE_STORE_NOT_FOUND | Error referencing a state store not found.
| ERR_STATE_GET | Error getting a state for state store. | ERR_STATE_STORES_NOT_CONFIGURED | Error no state stores configured.
| ERR_STATE_DELETE | Error deleting a state from state store. | ERR_NOT_SUPPORTED_STATE_OPERATION | Error trasaction requested on a state store with no trasaction support.
| ERR_STATE_SAVE | Error saving a state in state store. | ERR_STATE_GET | Error getting a state for state store.
| ERR_INVOKE_OUTPUT_BINDING | Error invoking an output binding. | ERR_STATE_DELETE | Error deleting a state from state store.
| ERR_MALFORMED_REQUEST | Error with a malformed request. | ERR_STATE_SAVE | Error saving a state in state store.
| ERR_DIRECT_INVOKE | Error in direct invocation. | ERR_INVOKE_OUTPUT_BINDING | Error invoking an output binding.
| ERR_DESERIALIZE_HTTP_BODY | Error deserializing an HTTP request body. | ERR_MALFORMED_REQUEST | Error with a malformed request.
| ERR_SECRET_STORE_NOT_CONFIGURED | Error that no secret store is configured. | ERR_DIRECT_INVOKE | Error in direct invocation.
| ERR_SECRET_STORE_NOT_FOUND | Error that specified secret store is not found. | ERR_DESERIALIZE_HTTP_BODY | Error deserializing an HTTP request body.
| ERR_HEALTH_NOT_READY | Error that Dapr is not ready. | ERR_SECRET_STORES_NOT_CONFIGURED | Error that no secret store is configured.
| ERR_SECRET_STORE_NOT_FOUND | Error that specified secret store is not found.
| ERR_HEALTH_NOT_READY | Error that Dapr is not ready.

View File

@ -22,7 +22,7 @@ GET http://localhost:<daprPort>/v1.0/healthz
Code | Description Code | Description
---- | ----------- ---- | -----------
200 | dapr is healthy 204 | dapr is healthy
500 | dapr is not healthy 500 | dapr is not healthy
### URL Parameters ### URL Parameters

View File

@ -21,7 +21,8 @@ POST http://localhost:<daprPort>/v1.0/publish/<pubsubname>/<topic>
Code | Description Code | Description
---- | ----------- ---- | -----------
200 | Message delivered 204 | Message delivered
404 | No pubsub name or topic given
500 | Delivery failed 500 | Delivery failed
### URL Parameters ### URL Parameters

View File

@ -89,7 +89,8 @@ Code | Description
200 | OK 200 | OK
204 | Secret not found 204 | Secret not found
400 | Secret store is missing or misconfigured 400 | Secret store is missing or misconfigured
500 | Failed to get secret 403 | Access denied
500 | Failed to get secret or no secret stores defined
### Examples ### Examples

View File

@ -28,6 +28,8 @@ In case a user invokes Dapr over HTTP to talk to a gRPC enabled service, an erro
Code | Description Code | Description
---- | ----------- ---- | -----------
XXX | Upstream status returned
400 | Method name not given
500 | Request failed 500 | Request failed
### URL Parameters ### URL Parameters
@ -118,4 +120,4 @@ In case you are invoking `mathService` on a different namespace, you can use the
In this URL, `testing` is the namespace that `mathService` is running in. In this URL, `testing` is the namespace that `mathService` is running in.
## Next Steps ## Next Steps
- [How-To: Invoke and discover services]({{< ref howto-invoke-discover-services.md >}}) - [How-To: Invoke and discover services]({{< ref howto-invoke-discover-services.md >}})

View File

@ -87,8 +87,8 @@ options | (optional) state operation options, see [state operation options](#opt
Code | Description Code | Description
---- | ----------- ---- | -----------
201 | State saved 204 | State saved
400 | State store is missing or misconfigured 400 | State store is missing or misconfigured or malformed request
500 | Failed to save state 500 | Failed to save state
#### Response Body #### Response Body
@ -184,7 +184,7 @@ This endpoint lets you get a list of values for a given list of keys.
### HTTP Request ### HTTP Request
``` ```
POST http://localhost:<daprPort>/v1.0/state/<storename>/bulk POST/PUT http://localhost:<daprPort>/v1.0/state/<storename>/bulk
``` ```
#### URL Parameters #### URL Parameters
@ -278,7 +278,7 @@ If-Match | (Optional) ETag associated with the key to be deleted
Code | Description Code | Description
---- | ----------- ---- | -----------
200 | Delete state successful 204 | Delete state successful
400 | State store is missing or misconfigured 400 | State store is missing or misconfigured
500 | Delete state failed 500 | Delete state failed
@ -315,8 +315,8 @@ POST/PUT http://localhost:<daprPort>/v1.0/state/<storename>/transaction
Code | Description Code | Description
---- | ----------- ---- | -----------
201 | Request successful 204 | Request successful
400 | State store is missing or misconfigured 400 | State store is missing or misconfigured or malformed request
500 | Request failed 500 | Request failed
#### URL Parameters #### URL Parameters
@ -456,4 +456,4 @@ curl -X POST http://localhost:3500/v1.0/state/starwars \
## Next Steps ## Next Steps
- [State management overview]({{< ref state-management-overview.md >}}) - [State management overview]({{< ref state-management-overview.md >}})
- [How-To: Save & get state]({{< ref howto-get-save-state.md >}}) - [How-To: Save & get state]({{< ref howto-get-save-state.md >}})