Error Handling
Common HTTP Status Codes
The BlockWyre API uses standard HTTP status codes to indicate the success or failure of an API request. In case of an error, a JSON response is returned, containing a message and, when possible, additional details to help resolve the issue.
-
400 Bad Request: The request was unacceptable, often due to missing a required parameter.
-
401 Unauthorized: No valid API key provided.
-
403 Forbidden: The API key doesn't have permissions to perform the request.
-
404 Not Found: The requested resource doesn't exist.
-
500 Internal Server Error: Something went wrong on our end. (Please report these errors to our support team.)
-
Error Response Structure:
{
"error": {
"code": 400,
"message": "The provided account ID is invalid or does not exist",
"details": "Account ID must be a valid UUID format"
}
}
Additional Error Examples:
401 Unauthorized:
{
"error": {
"code": 401,
"message": "Invalid or missing API key",
"details": "Please provide a valid Bearer token in the Authorization header"
}
}
400 Bad Request:
{
"error": {
"code": 400,
"message": "Required field is missing",
"details": "The 'amount' field is required and must be a positive number"
}
}
403 Forbidden:
{
"error": {
"code": 403,
"message": "API key does not have permission to perform this action",
"details": "This operation requires 'trade:create' permission"
}
}
- Best Practices:
- Check the code and message in the error response to understand what went wrong.
- Handle different error statuses in your code gracefully.
- Report unhandled errors or inconsistencies in error responses to our support team.
Support and Resources
If you need assistance or have any questions, our support team is here to help. You can contact our support team at support@blockwyre.com.
Stay Updated
Stay up-to-date with the latest news, updates, and features from BlockWyre by following us on social media:
- Instagram: BlockWyre Instagram
- Twitter: BlockWyre Twitter
- Facebook: BlockWyre Facebook
- LinkedIn: BlockWyre LinkedIn
We are excited to have you on board and look forward to seeing how you leverage BlockWyre's powerful tools to enhance your financial operations. Happy integrating!