Module: ErrorCode
- Defined in:
- lib/wallee-ruby-sdk/wallee_sdk_exception.rb
Overview
The ‘ErrorCode` module defines potential error codes that may be raised by the Wallee SDK.
## Error Code Ranges:
-
**1000–1999**: Client-side errors – typically due to invalid input (e.g., malformed headers, bad keys).
-
**2000–2999**: Server-side errors – typically due to incorrect data provided by the server.
-
404: Not Found – used when an endpoint returns an empty response.
Constant Summary collapse
- UNKNOWN_WEBHOOK_ENCRYPTION_PUBLIC_KEY =
404
{ code: 404, description: "Unknown webhook signature public key" }
- WEBHOOK_ENCRYPTION_GENERAL_ERROR =
1000–1999
{ code: 1000, description: "General webhook encryption error" }
- INVALID_WEBHOOK_ENCRYPTION_PUBLIC_KEY =
{ code: 1001, description: "Invalid webhook signature public key" }
- INVALID_WEBHOOK_ENCRYPTION_HEADER_FORMAT =
{ code: 1002, description: "Invalid webhook signature header" }
- UNSUPPORTED_WEBHOOK_ENCRYPTION_ALGORYTHM =
{ code: 1003, description: "Unsupported webhook signature algorithm" }
- UNKNOWN_WEBHOOK_ENCRYPTION_PROVIDER =
{ code: 1004, description: "Unknown webhook encryption provider" }
- WEBHOOK_ENCRYPTION_VERIFIER_INIT_ERROR =
{ code: 1005, description: "Encryption verifier initialization error" }
- WEBHOOK_ENCRYPTION_VERIFIER_CONTENT_UPDATE_ERROR =
{ code: 1006, description: "Error during content update in encryption verifier" }
- WEBHOOK_ENCRYPTION_SIGNATURE_VERIFICATION_FAILED =
{ code: 1007, description: "Encryption signature verification failed" }
- INVALID_WEBHOOK_ENCRYPTION_CONTENT_SIGNATURE =
{ code: 1008, description: "Invalid webhook content signature" }
- MISSING_WEBHOOK_ENCRYPTION_ALGORYTHM =
2000–2999
{ code: 2000, description: "Missing webhook signature algorithm value" }
Class Method Summary collapse
Class Method Details
.to_s(error) ⇒ Object
46 47 48 |
# File 'lib/wallee-ruby-sdk/wallee_sdk_exception.rb', line 46 def self.to_s(error) "#{error[:code]}: #{error[:description]}" end |