Error Codes Reference

This page contains a comprehensive list of error codes returned by Glider APIs. Understanding these error codes can help with troubleshooting and implementing better error handling in your applications.

Platform API Error Codes

The Platform API uses error codes in the format API_XXX, where XXX is a numerical code. Errors are grouped into categories:

General Errors (000-099)

CodeNameDescription
API_000UNKNOWN_ERRORAn unknown error occurred
API_001CONFIGURATION_ERRORMissing or invalid configuration
API_002INVALID_REQUESTThe request is invalid or malformed
API_003METHOD_NOT_ALLOWEDThe HTTP method is not allowed for this endpoint
API_004RATE_LIMIT_EXCEEDEDRate limit has been exceeded
API_005FEATURE_UNAVAILABLEThe requested feature is not available
API_006NOT_FOUNDThe requested resource was not found

Authentication and Authorization Errors (100-199)

CodeNameDescription
API_100UNAUTHORIZEDAuthentication is required to access this resource
API_101API_KEY_MISSINGAPI key is required but was not provided
API_102API_KEY_INVALIDThe provided API key is invalid
API_103API_KEY_EXPIREDThe provided API key has expired
API_104PERMISSION_DENIEDPermission denied to perform the operation
API_105TENANT_NOT_FOUNDThe requested tenant was not found
API_106TENANT_DISABLEDThe tenant account is disabled
API_107USER_NOT_FOUNDThe requested user was not found
API_108TOKEN_EXPIREDThe authentication token has expired
API_109TOKEN_INVALIDThe authentication token is invalid
API_110FORBIDDEN_ACTIONThe requested action is forbidden

Portfolio Specific Errors (200-299)

CodeNameDescription
API_200PORTFOLIO_NOT_FOUNDThe requested portfolio was not found
API_201PORTFOLIO_CREATE_FAILEDFailed to create portfolio
API_202PORTFOLIO_ALREADY_EXISTSA portfolio with this identifier already exists
API_203PORTFOLIO_UPDATE_FAILEDFailed to update portfolio
API_204PORTFOLIO_DELETE_FAILEDFailed to delete portfolio
API_205PORTFOLIO_LIMIT_REACHEDPortfolio limit has been reached
API_206PORTFOLIO_TEMPLATE_NOT_FOUNDThe requested portfolio template was not found
API_207PORTFOLIO_TEMPLATE_VALIDATION_ERRORThe portfolio template failed validation
API_208PORTFOLIO_SESSION_KEY_MISSINGSession key is missing for portfolio operations
API_209PORTFOLIO_RESIGN_REQUIRED__INVALID_SESSION_KEYPortfolio requires re-signing due to invalid session key

Signature and Cryptographic Errors (300-399)

CodeNameDescription
API_300SIGNATURE_MISSINGSignature is required but was not provided
API_301SIGNATURE_INVALIDThe provided signature is invalid
API_302SIGNATURE_VERIFICATION_FAILEDFailed to verify the provided signature
API_303SESSION_KEY_GENERATION_FAILEDFailed to generate session key
API_304MESSAGE_GENERATION_FAILEDFailed to generate message for signing
API_305WALLET_CONNECTION_FAILEDFailed to connect to wallet
API_306INVALID_MESSAGEThe message format is invalid for signing
API_307MESSAGE_RECOVERY_FAILEDFailed to recover address from signed message
API_308MISSING_MESSAGE_FIELDRequired field missing from message

Validation Errors (400-499)

CodeNameDescription
API_400VALIDATION_ERRORInput validation failed
API_401INVALID_ADDRESSInvalid address format
API_402INVALID_CHAIN_IDInvalid chain ID
API_403CHAIN_NOT_SUPPORTEDThe specified chain is not supported
API_404INVALID_KERNEL_VERSIONInvalid kernel version
API_405INVALID_PERMISSIONSInvalid permissions format
API_406MISSING_REQUIRED_FIELDRequired field is missing
API_407INVALID_FORMATInput data has an invalid format
API_408INVALID_PARAMETEROne or more parameters are invalid
API_409INVALID_USER_ADDRESS_CODEInvalid user address format

External Service Errors (500-599)

CodeNameDescription
API_500PROVIDER_ERRORError from an external provider
API_501PROVIDER_UNAVAILABLEExternal provider service is unavailable
API_502PROVIDER_TIMEOUTRequest to external provider timed out
API_503BLOCKCHAIN_RPC_ERRORError from blockchain RPC endpoint
API_504EXTERNAL_SERVICE_ERRORError from an external service
API_505EXTERNAL_REQUEST_FAILEDExternal service request failed

Deposit and Wallet Operation Errors (550-570)

CodeNameDescription
API_550DEPOSIT_REQUEST_INSUFFICIENT_ASSET_BALANCEInsufficient asset balance for deposit request
API_551TRANSACTION_SIMULATION_FAILEDTransaction simulation failed
API_552CANNOT_FETCH_NATIVE_BALANCEFailed to fetch native token balance
API_553CANNOT_FETCH_ERC20_BALANCEFailed to fetch ERC20 token balance
API_554MAX_WITHDRAWAL_PROCESSING_ERRORError processing maximum withdrawal amount
API_555ZERO_BALANCE_WITHDRAWAL_ERRORAttempting to withdraw zero balance

Internal Errors (600-699)

CodeNameDescription
API_600INTERNAL_ERRORInternal server error
API_601DATABASE_ERRORError with database operation
API_602SERIALIZATION_ERRORError serializing or deserializing data
API_603PROCESSING_ERRORError processing the request
API_604TRANSACTION_FAILEDTransaction processing failed
API_605DATA_INTEGRITY_ERRORData integrity violation
API_606CACHE_ERRORError with cache operation
API_607RESOURCE_NOT_FOUNDRequested resource not found

KMS API Error Codes

The KMS API uses error codes in the format KMS_XXX, where XXX is a numerical code. Errors are grouped into categories:

General Errors (000-099)

CodeNameDescription
KMS_000UNKNOWN_ERRORAn unknown error occurred
KMS_001CONFIGURATION_ERRORMissing or invalid configuration
KMS_002INVALID_REQUESTThe request is invalid or malformed

Key Management Errors (100-199)

CodeNameDescription
KMS_100KEY_NOT_FOUNDThe requested key was not found
KMS_101KEY_ALREADY_EXISTSA key with this identifier already exists
KMS_102KEY_CREATION_FAILEDFailed to create key
KMS_103KEY_LENGTH_EXCEEDEDThe key ID length exceeds the provider limit
KMS_104KEY_VERSION_INVALIDInvalid key version
KMS_105KEY_RING_NOT_FOUNDThe key ring was not found
KMS_106KEY_RING_CREATION_FAILEDFailed to create key ring

Permission Errors (200-299)

CodeNameDescription
KMS_200PERMISSION_DENIEDPermission denied to perform the operation
KMS_201UNAUTHORIZEDUnauthorized to access the requested resource
KMS_202ACCESS_REVOKEDAccess to the resource has been revoked

Validation Errors (300-399)

CodeNameDescription
KMS_300VALIDATION_ERRORGeneral validation error
KMS_301INVALID_ADDRESSInvalid Ethereum address format
KMS_302INVALID_STRATEGY_IDInvalid strategy ID format or length
KMS_303INVALID_KEY_IDInvalid key ID format
KMS_304INVALID_MESSAGEInvalid message format for signing
KMS_305INVALID_TRANSACTIONInvalid transaction format for signing

External Service Errors (400-499)

CodeNameDescription
KMS_400PROVIDER_ERRORError from the KMS provider (GCP, AWS, etc.)
KMS_401PROVIDER_UNAVAILABLEKMS provider service is unavailable
KMS_402PROVIDER_TIMEOUTRequest to KMS provider timed out

Internal Errors (500-599)

CodeNameDescription
KMS_500INTERNAL_ERRORInternal server error
KMS_501DATABASE_ERRORError with the database operation
KMS_502SIGNING_ERRORError during signing operation

Error Response Format

API error responses follow a standardized format:

{
  "success": false,
  "error": {
    "message": "Error message explaining what went wrong",
    "code": "API_XXX",
    "details": {}, // Optional additional error details
    "correlationId": "unique-correlation-id",
    "requestId": "unique-request-id",
    "timestamp": "2025-05-21T12:34:56.789Z"
  }
}

Error Response Fields

FieldDescription
successAlways false for error responses
error.messageHuman-readable error description
error.codeStandardized error code (e.g., API_404)
error.detailsOptional object containing additional error context
error.correlationIdUnique ID for correlating errors across systems
error.requestIdUnique ID for the specific request
error.timestampISO timestamp when the error occurred

Handling Errors

When implementing error handling in your application:

  1. Check the error.code to identify specific error conditions
  2. Use the error.message for displaying to users or logging
  3. Include the correlationId and requestId when reporting issues to Glider support
  4. For validation errors, check the error.details field for specific validation failures