Verified by the sovseal team

Errors

Error response format and codes used by the sovseal edge function.

When a request fails, the edge function returns a standard JSON error envelope with an appropriate HTTP status code.

Error Response Envelope

Unlike the legacy success/error wrappers, the production edge endpoint returns a flat error object containing the error code:

{
  "error": "sequence_gap"
}

Error Code Reference

The following table documents the codes returned by the API, grouped by their HTTP status codes:

HTTP StatusError CodeDescription
400 Bad Requestinvalid_jsonThe request body could not be parsed as valid JSON.
missing_field:<field>A required field (e.g. agent_id, ciphertext_b64) is missing.
bad_policy_hashThe policy_hash field is not a valid 64-hex string.
bad_payload_hashThe client_payload_hash field is not a valid 64-hex string.
bad_sequenceThe sequence_number is invalid or negative.
genesis_violationThe sequence number is 0 but parent_snapshot is not null.
missing_parent_snapshotThe sequence number is > 0 but no parent snapshot ID was provided.
byte_size_mismatchDecoded base64 ciphertext length does not match byte_size.
missing_since_paramThe since query parameter is missing on a replay request.
401 Unauthorizedmissing_or_invalid_bearer_tokenThe Authorization header is empty or malformed.
session_jwt_requiredThe endpoint requires a user login session JWT, not an API key.
invalid_sessionThe Supabase user session token is expired or invalid.
invalid_api_keyThe hashed sov_live_ key was not found in the database.
api_key_revokedThe API key was soft-deleted/revoked.
owner_not_foundThe key owner's user record was not found in the platform.
402 Payment Requiredinsufficient_creditsThe key owner has run out of state sync credits.
403 Forbiddennot_a_team_memberThe authenticated user is not a member of the requested ZK team.
forbidden_roleThe member's role (e.g. read) lacks permissions for the action.
telemetry_disabledThe user's persisted dashboard settings have telemetry opted off.
no_grantThe member has not accepted the team invite or holds no wrapped key grant.
404 Not Foundno_snapshots_for_agentThe agent has no confirmed snapshots to restore.
snapshot_not_foundNo snapshot exists for the requested sequence number.
route_not_foundThe request URL does not map to any active handler.
409 Conflictsequence_conflictA snapshot already exists at this sequence number with a different hash.
sequence_gapThe requested snapshot sequence number is not exactly latest + 1.
split_brain_detectedA duplicate sequence insertion has different data hashes (replication conflict).
413 Payload Too Largeciphertext_too_largeDecrypted ciphertext exceeds MAX_PAYLOAD_BYTES (10 MB).
chunk_too_largeDecoded replication chunk exceeds MAX_CHUNK_BYTES (256 KB).
503 Service Unavailablestorage_unavailableThe storage backend (Supabase Storage/Arweave) was temporarily unreachable.

On this page