OstiumBuilder Service
Getting Started

Error Handling

Error envelopes and error codes.

Alpha Version

The Ostium Builder Service is in Alpha. API endpoints, specifications, and builder URLs may change without notice. Use with caution in production environments.

HTTP Error Envelope

FieldTypeRequiredDescription
errorstringYesHuman-readable error message.
codenumberYesHTTP status code.
errorCodestringYesMachine-readable error code.
detailsobjectNoExtra context (e.g., validation errors).

Example:

{
  "error": "Validation failed: Price must be a positive number string",
  "code": 400,
  "errorCode": "VALIDATION_ERROR",
  "details": {
    "validationErrors": {
      "open.p": ["Price must be a positive number string"]
    }
  }
}

Validation Errors

Validation errors include a details.validationErrors object keyed by field path.

WebSocket Error Envelope

WebSocket errors are returned inside the message envelope under error.

FieldTypeRequiredDescription
messagestringYesHuman-readable error message.
codenumberYesHTTP-style status code.
errorCodestringYesMachine-readable error code.

Example:

{
  "id": "client-1",
  "ok": false,
  "error": {
    "message": "Invalid JSON payload",
    "code": 400,
    "errorCode": "INVALID_REQUEST"
  }
}

Error Codes

  • VALIDATION_ERROR
  • INVALID_REQUEST
  • INVALID_ACTION
  • INVALID_ADDRESS
  • NOT_FOUND
  • UNAUTHORIZED
  • RATE_LIMIT_EXCEEDED
  • INTERNAL_ERROR
  • SERVICE_UNAVAILABLE

On this page