Error Codes

Reference for error codes returned by the RelayRail API.

Authentication Errors

CodeDescription
AUTH_REQUIREDNo API key provided
AUTH_INVALIDInvalid or expired API key
AUTH_INACTIVEAgent is deactivated

Rate Limit Errors

CodeDescription
RATE_LIMITEDToo many requests, slow down
QUOTA_EXCEEDEDDaily/monthly quota exceeded
SMS_LIMIT_REACHEDSMS quota exhausted for billing period

Request Errors

CodeDescription
INVALID_PARAMSMissing or invalid parameters
REQUEST_NOT_FOUNDApproval request doesn't exist
REQUEST_EXPIREDApproval request has timed out
REQUEST_ALREADY_RESPONDEDRequest was already answered

Delivery Errors

CodeDescription
SMS_DELIVERY_FAILEDSMS could not be delivered
EMAIL_DELIVERY_FAILEDEmail could not be delivered
NO_CONTACT_METHODUser has no phone or email configured

Handling Errors

Errors are returned in the tool response:

{
  "success": false,
  "error": {
    "code": "RATE_LIMITED",
    "message": "Too many requests. Please wait 60 seconds."
  }
}

Your agent should check the success field and handle errors appropriately.