-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs: add status codes documentation (#549)
Signed-off-by: Gustavo Inacio <[email protected]>
- Loading branch information
Showing
1 changed file
with
26 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# Status Codes | ||
|
||
The request handler may return various status codes depending | ||
on the encountered errors. These codes provide insight into | ||
what went wrong, without necessarily indicating how to fix the issue. | ||
|
||
## General Errors | ||
|
||
| **Status Code** | **Name** | **Description** | | ||
|-----------------------------|------------------------------------------------------|------------------------------------------------------------------------------------------------------| | ||
| `400 BAD_REQUEST` | `TapCoreError(SignatureError or ReceiptError::CheckFailure)` | The received Tap-related data is invalid (e.g., incorrect signature or failed receipt check). | | ||
| `402 PAYMENT_REQUIRED` | `ReceiptNotFound` | A required Tap receipt was not found in the request. | | ||
| `402 PAYMENT_REQUIRED` | `EscrowAccount` | The signer does not match any known sender or the domain for signature recovery is incorrect (as per the `[blockchain]` section in the config). | | ||
| `500 INTERNAL_SERVER_ERROR` | `TapCoreError(Other)` | An internal server error related to Tap core functionality, such as a failure in storing the receipt. | | ||
| `502 BAD_GATEWAY` | `SerializationError` | The response from `graph-node` could not be serialized into a GraphQL response. | | ||
| `503 SERVICE_UNAVAILABLE` | `QueryForwardingError` | The request could not be processed due to an error while forwarding the query to graph-node. | | ||
|
||
## Status Query Errors | ||
|
||
These errors occur specifically during `status` operations: | ||
|
||
| **Status Code** | **Name** | **Description** | | ||
|---------------------|-----------------------------------|--------------------------------------------------| | ||
| `400 BAD_REQUEST` | `InvalidStatusQuery` | The query contains invalid status parameters. | | ||
| `400 BAD_REQUEST` | `UnsupportedStatusQueryFields` | The query includes fields that are not supported. | | ||
| `502 BAD_GATEWAY` | `StatusQueryError` | An internal error was encountered during the status query process. | |