Skip to content

Commit 5159de2

Browse files
authored
docs: add status codes documentation (#549)
Signed-off-by: Gustavo Inacio <[email protected]>
1 parent 44b1851 commit 5159de2

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

docs/StatusCode.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# Status Codes
2+
3+
The request handler may return various status codes depending
4+
on the encountered errors. These codes provide insight into
5+
what went wrong, without necessarily indicating how to fix the issue.
6+
7+
## General Errors
8+
9+
| **Status Code** | **Name** | **Description** |
10+
|-----------------------------|------------------------------------------------------|------------------------------------------------------------------------------------------------------|
11+
| `400 BAD_REQUEST` | `TapCoreError(SignatureError or ReceiptError::CheckFailure)` | The received Tap-related data is invalid (e.g., incorrect signature or failed receipt check). |
12+
| `402 PAYMENT_REQUIRED` | `ReceiptNotFound` | A required Tap receipt was not found in the request. |
13+
| `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). |
14+
| `500 INTERNAL_SERVER_ERROR` | `TapCoreError(Other)` | An internal server error related to Tap core functionality, such as a failure in storing the receipt. |
15+
| `502 BAD_GATEWAY` | `SerializationError` | The response from `graph-node` could not be serialized into a GraphQL response. |
16+
| `503 SERVICE_UNAVAILABLE` | `QueryForwardingError` | The request could not be processed due to an error while forwarding the query to graph-node. |
17+
18+
## Status Query Errors
19+
20+
These errors occur specifically during `status` operations:
21+
22+
| **Status Code** | **Name** | **Description** |
23+
|---------------------|-----------------------------------|--------------------------------------------------|
24+
| `400 BAD_REQUEST` | `InvalidStatusQuery` | The query contains invalid status parameters. |
25+
| `400 BAD_REQUEST` | `UnsupportedStatusQueryFields` | The query includes fields that are not supported. |
26+
| `502 BAD_GATEWAY` | `StatusQueryError` | An internal error was encountered during the status query process. |

0 commit comments

Comments
 (0)