Errors
Waysdrop returns a consistent error envelope for HTTP exceptions (via the global exception filter).Error envelope
All errors use this structure:statusCode: HTTP status codemethod: HTTP methodtimestamp: ISO timestamp when the error was generatedpath: request path without query stringurl: full request URL (includes query string)message: human-readable error messageenvironment: server environment label
API key auth errors
Missing API key
Status:401 UnauthorizedMessage:
API key is required
Invalid API key format
API keys must match:wsp_(live|staging)_[a-f0-9]{64}
Status: 401 UnauthorizedMessage:
Invalid API key format
Invalid or inactive API key
Status:401 UnauthorizedMessage:
Invalid API key
Rate limits / quota
API quota exceeded
Status:429 Too Many RequestsMessage:
API quota exceeded
Business errors
Insufficient balance
Returned when wallet debit fails (e.g., creating a delivery request). Status:422 Unprocessable EntityMessage:
Insufficient balance
Payment required
Returned when wallet debit fails for api usage Status:402 Payment RequiredMessage:
Insufficient wallet balance for API usage
Validation errors
Request validation errors are returned as400 Bad Request and the message contains a semi-colon separated list.
Success responses
Most successful API responses use:204 No Content (no JSON body).