When any sovseal API request fails, the edge function returns a flat JSON error envelope with a machine-readable error code and the appropriate HTTP status. Your client should branch on the error field — not the HTTP status alone — since multiple distinct conditions can share a status code. The error envelope format is consistent across all endpoints.
Every error response has the following structure:
Some errors include additional fields. For example, split-brain conflicts attach a conflicts array:
Error Code Reference
400 Bad Request
The request body or query parameters were structurally invalid or logically inconsistent.
401 Unauthorized
The request could not be authenticated.
402 Payment Required
The authenticated account does not have sufficient billing credits to complete the operation.
As of this writing, credits_milli defaults to 0 on every account and is not funded by subscribing to a paid plan through Polar — the current subscription webhook updates plan/quota fields but does not grant credits. If you are hitting this error on a paid key, that is very likely a billing-configuration issue on our end rather than something you can resolve by upgrading. Contact enterprise@sovseal.com if you see this.
403 Forbidden
The request was authenticated but the caller lacks permission for the requested action.
404 Not Found
The requested resource does not exist.
409 Conflict
The request conflicts with existing persisted state.
413 Payload Too Large
The submitted ciphertext exceeds the allowed size limit.
503 Service Unavailable
The storage backend is temporarily unreachable.