diff --git a/daprdocs/content/en/developing-applications/debugging/_index.md b/daprdocs/content/en/developing-applications/debugging/_index.md index bb9d76df1..d6d77e77d 100644 --- a/daprdocs/content/en/developing-applications/debugging/_index.md +++ b/daprdocs/content/en/developing-applications/debugging/_index.md @@ -2,6 +2,6 @@ type: docs title: "Debugging Dapr applications and the Dapr control plane" linkTitle: "Debugging" -weight: 50 +weight: 60 description: "Guides on how to debug Dapr applications and the Dapr control plane" --- \ No newline at end of file diff --git a/daprdocs/content/en/developing-applications/develop-components/_index.md b/daprdocs/content/en/developing-applications/develop-components/_index.md index cb9f7e8a8..970744958 100644 --- a/daprdocs/content/en/developing-applications/develop-components/_index.md +++ b/daprdocs/content/en/developing-applications/develop-components/_index.md @@ -2,6 +2,6 @@ type: docs title: "Components" linkTitle: "Components" -weight: 30 +weight: 40 description: "Learn more about developing Dapr's pluggable and middleware components" --- diff --git a/daprdocs/content/en/developing-applications/error-codes/_index.md b/daprdocs/content/en/developing-applications/error-codes/_index.md new file mode 100644 index 000000000..f693722f5 --- /dev/null +++ b/daprdocs/content/en/developing-applications/error-codes/_index.md @@ -0,0 +1,8 @@ +--- +type: docs +title: "Error codes" +linkTitle: "Error codes" +weight: 20 +description: "Error codes and messages you may encounter while using Dapr" +--- + diff --git a/daprdocs/content/en/reference/api/error_codes.md b/daprdocs/content/en/developing-applications/error-codes/error-codes-reference.md similarity index 95% rename from daprdocs/content/en/reference/api/error_codes.md rename to daprdocs/content/en/developing-applications/error-codes/error-codes-reference.md index c098521cc..314bf67c4 100644 --- a/daprdocs/content/en/reference/api/error_codes.md +++ b/daprdocs/content/en/developing-applications/error-codes/error-codes-reference.md @@ -1,20 +1,11 @@ --- type: docs -title: "Error codes returned by APIs" -linkTitle: "Error codes" -description: "Detailed reference of the Dapr API error codes" -weight: 1400 +title: "Error codes reference guide" +linkTitle: "Reference" +description: "List of gRPC and HTTP error codes in Dapr and their descriptions" +weight: 20 --- -For http calls made to Dapr runtime, when an error is encountered, an error json is returned in http response body. The json contains an error code and an descriptive error message, e.g. - -``` -{ - "errorCode": "ERR_STATE_GET", - "message": "Requested state key does not exist in state store." -} -``` - The following tables list the error codes returned by Dapr runtime: ### Actors API @@ -154,3 +145,8 @@ The following tables list the error codes returned by Dapr runtime: | ERR_MALFORMED_REQUEST | Error with a malformed request. | | ERR_MALFORMED_REQUEST_DATA | Error request data is malformed. | | ERR_MALFORMED_RESPONSE | Error response data is malformed. | + +## Next steps + +- [Handling HTTP error codes]({{< ref http-error-codes.md >}}) +- [Handling gRPC error codes]({{< ref grpc-error-codes.md >}}) \ No newline at end of file diff --git a/daprdocs/content/en/developing-applications/error-codes/errors-overview.md b/daprdocs/content/en/developing-applications/error-codes/errors-overview.md new file mode 100644 index 000000000..5f34aff4d --- /dev/null +++ b/daprdocs/content/en/developing-applications/error-codes/errors-overview.md @@ -0,0 +1,13 @@ +--- +type: docs +title: "Errors overview" +linkTitle: "Overview" +weight: 10 +description: "Overview of Dapr errors" +--- + + + +## Next step + +{{< button text="Error code reference" page="error-codes-reference" >}} diff --git a/daprdocs/content/en/reference/errors/_index.md b/daprdocs/content/en/developing-applications/error-codes/grpc-error-codes.md similarity index 93% rename from daprdocs/content/en/reference/errors/_index.md rename to daprdocs/content/en/developing-applications/error-codes/grpc-error-codes.md index 35f685f74..1d343cce5 100644 --- a/daprdocs/content/en/reference/errors/_index.md +++ b/daprdocs/content/en/developing-applications/error-codes/grpc-error-codes.md @@ -1,20 +1,18 @@ --- type: docs -title: Dapr errors -linkTitle: "Dapr errors" -weight: 700 -description: "Information on Dapr errors and how to handle them" +title: Handling gRPC error codes +linkTitle: "gRPC" +weight: 40 +description: "Information on Dapr gRPC errors and how to handle them" --- -## Error handling: Understanding errors model and reporting - Initially, errors followed the [Standard gRPC error model](https://grpc.io/docs/guides/error/#standard-error-model). However, to provide more detailed and informative error messages, an enhanced error model has been defined which aligns with the gRPC [Richer error model](https://grpc.io/docs/guides/error/#richer-error-model). {{% alert title="Note" color="primary" %}} Not all Dapr errors have been converted to the richer gRPC error model. {{% /alert %}} -### Standard gRPC Error Model +## Standard gRPC Error Model The [Standard gRPC error model](https://grpc.io/docs/guides/error/#standard-error-model) is an approach to error reporting in gRPC. Each error response includes an error code and an error message. The error codes are standardized and reflect common error conditions. @@ -25,7 +23,7 @@ ERROR: Message: input key/keyPrefix 'bad||keyname' can't contain '||' ``` -### Richer gRPC Error Model +## Richer gRPC Error Model The [Richer gRPC error model](https://grpc.io/docs/guides/error/#richer-error-model) extends the standard error model by providing additional context and details about the error. This model includes the standard error `code` and `message`, along with a `details` section that can contain various types of information, such as `ErrorInfo`, `ResourceInfo`, and `BadRequest` details. diff --git a/daprdocs/content/en/developing-applications/error-codes/http-error-codes.md b/daprdocs/content/en/developing-applications/error-codes/http-error-codes.md new file mode 100644 index 000000000..c05a0dac8 --- /dev/null +++ b/daprdocs/content/en/developing-applications/error-codes/http-error-codes.md @@ -0,0 +1,21 @@ +--- +type: docs +title: "Handling HTTP error codes" +linkTitle: "HTTP" +description: "Detailed reference of the Dapr HTTP error codes and how to handle them" +weight: 30 +--- + +For http calls made to Dapr runtime, when an error is encountered, an error json is returned in http response body. The json contains an error code and an descriptive error message, e.g. + +``` +{ + "errorCode": "ERR_STATE_GET", + "message": "Requested state key does not exist in state store." +} +``` + +## Related + +- [Error code reference list]({{< ref error-codes-reference.md >}}) +- [Handling gRPC error codes]({{< ref grpc-error-codes.md >}}) \ No newline at end of file diff --git a/daprdocs/content/en/developing-applications/integrations/_index.md b/daprdocs/content/en/developing-applications/integrations/_index.md index a884aeb5c..b988581b7 100644 --- a/daprdocs/content/en/developing-applications/integrations/_index.md +++ b/daprdocs/content/en/developing-applications/integrations/_index.md @@ -2,6 +2,6 @@ type: docs title: "Integrations" linkTitle: "Integrations" -weight: 60 +weight: 70 description: "Dapr integrations with other technologies" --- \ No newline at end of file diff --git a/daprdocs/content/en/developing-applications/local-development/_index.md b/daprdocs/content/en/developing-applications/local-development/_index.md index b06587df5..8ffc396d4 100644 --- a/daprdocs/content/en/developing-applications/local-development/_index.md +++ b/daprdocs/content/en/developing-applications/local-development/_index.md @@ -2,6 +2,6 @@ type: docs title: "Local development" linkTitle: "Local development" -weight: 40 +weight: 50 description: "Capabilities for developing Dapr applications locally" --- \ No newline at end of file diff --git a/daprdocs/content/en/developing-applications/sdks/_index.md b/daprdocs/content/en/developing-applications/sdks/_index.md index 4f56c0513..5434d497b 100644 --- a/daprdocs/content/en/developing-applications/sdks/_index.md +++ b/daprdocs/content/en/developing-applications/sdks/_index.md @@ -2,7 +2,7 @@ type: docs title: "Dapr Software Development Kits (SDKs)" linkTitle: "SDKs" -weight: 20 +weight: 30 description: "Use your favorite languages with Dapr" no_list: true ---