ByCloud Docs
GuidesCLIAPISDK

Errors

When an error occurs, the API returns an appropriate HTTP status code along with a JSON error object containing details about the issue.

Error Response Format

All error responses follow this structure:

{ "error": { "code": 400, "message": "Invalid request parameters", "details": "Field 'name' is required", "request_id": "req-550e8400-e29b-41d4-a716-446655440000" } }

Error Fields

code - HTTP status code

message - Human-readable error message

details - Additional details about the error (optional)

request_id - Unique identifier for debugging

HTTP Status Codes

CodeNameDescription
400Bad RequestThe request was malformed or missing required parameters.
401UnauthorizedAuthentication credentials are missing or invalid.
403ForbiddenYou don't have permission to access this resource.
404Not FoundThe requested resource doesn't exist.
409ConflictThe request conflicts with the current state of the resource.
422Unprocessable EntityThe request was well-formed but contains invalid data.
429Too Many RequestsYou've exceeded the rate limit. Retry after the specified time.
500Internal Server ErrorAn unexpected error occurred on the server.
503Service UnavailableThe service is temporarily unavailable. Try again later.

Handling Errors

When handling errors, check the HTTP status code first, then parse the error response body for more details. Always log the request_id to help with debugging and support requests.