Errors

Solenoid Key returns structured error responses with machine-readable codes.

{
  "error": "Human readable message",
  "code": "service.error_name",
  "fields": { "field_name": ["Validation error message"] }
}

The fields object appears only for validation errors.

HTTP status codes

StatusMeaning
200Success
201Key created
400Validation failed
401Missing or invalid token
403Authenticated but not authorized
404Key not found
409Duplicate key configuration
429Rate limit exceeded
500Internal server error

Verification errors

Returned in VerifyResult.error when valid: false.

ErrorCauseFix
invalid_keyFormat invalid, checksum mismatch, or not foundCheck key was copied completely with no extra whitespace
expiredKey past its expires_at timestampRotate to generate a new key
revokedKey revoked via DELETE endpointCreate a new key
deletedKey or project soft-deletedContact support within 30-day retention window

Validation errors

CodeStatusCauseFix
validation_error400Request body doesn’t match schemaCheck fields object for specifics
invalid_prefix400Prefix empty, >20 chars, or invalid charactersUse 1-20 alphanumeric chars + underscore
duplicate_key409Key with same configuration existsChange name or use existing key

Base error codes

Shared across all Solenoid services.

CodeCauseFix
invalid_requestMalformed JSON or wrong Content-TypeValidate request format
unauthorizedMissing or invalid authenticationCheck Bearer token
forbiddenNot authorized for this resourceVerify project access
not_foundResource doesn’t existCheck key ID
rate_limit_exceededToo many requestsImplement backoff. See Rate Limits.
internal_errorServer errorReport to support

Key-specific error codes

CodeCauseFix
key.invalid_keyKey format invalid or not foundVerify key format: prefix_entropy_checksum
key.expiredKey past expirationRotate to get a new key
key.revokedKey explicitly revokedCreate a new key
key.deletedKey soft-deletedContact support within 30 days
key.invalid_prefixPrefix validation failedUse 1-20 alphanumeric + underscore chars

Next steps