Skip to content

Commit 68a3c36

Browse files
Merge pull request #10 from OceanProtocolEnterprise/galex/web3
PolicyServer: web3 address verification & SSI Policy verification changes
2 parents f44118d + 098df05 commit 68a3c36

File tree

6 files changed

+2042
-247
lines changed

6 files changed

+2042
-247
lines changed

ERROR_CODES.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
📁 HTTP 4xx Client Errors
2+
3+
| Code | Error Name | Description | When It's Used |
4+
|------|------------------------|-----------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------|
5+
| 400 | `MISSING_FIELDS` | One or more required fields are missing in the request payload. | `consumerAddress`, `ddo`, `serviceId`, or `sessionId` is not provided. |
6+
| 400 | `SESSION_REQUIRED` | A required session ID is missing in the request. | Used when `sessionId` is a necessary parameter for continuation. |
7+
| 403 | `ADDRESS_DENIED` | Consumer's address was explicitly placed in a deny list. | The address is present in the deny list at either asset or service level. |
8+
| 403 | `ADDRESS_NOT_ALLOWED` | Consumer's address is not included in allow lists, and no wildcard is defined. | Address doesn’t match policy-defined allow rules. |
9+
| 403 | `EMPTY_ALLOW_LIST` | A policy has an allow list defined but it is empty. | Indicates policy misconfiguration at asset/service level. |
10+
| 404 | `SERVICE_NOT_FOUND` | The requested service ID does not match any service in the DDO. | Service ID provided does not exist in the credentialSubject. |
11+
| 422 | `INVALID_JSON` | Failed to parse a JSON string (e.g., `policyServer`) or the structure is not as expected. | JSON parsing fails or fields don’t meet the schema. |
12+
| 422 | `CREDENTIAL_FETCH_FAILED` | SSIpolicy exists but `request_credentials` could not be fetched or is invalid. | A malformed or missing SSI structure inside `ddo.credentials`. |
13+
14+
⚠️ Default Fallback
15+
16+
| Code | Error Name | Description |
17+
|------|---------------------|--------------------------------------------|
18+
| 500 | `UNKNOWN_ERROR` | An unexpected internal error occurred. |

0 commit comments

Comments
 (0)