Rezin Core Rezin Core
Docs

Reference

Errors

Every error from the API is JSON with two fields:

{ "error": "filter_required", "message": "Say which rows to change, for example ?id=eq.<id>." }

error is a stable code for your program. message is words for a person, and may be reworded. Errors never carry stack traces, database messages or your data.

By status

StatusMeaning
400The request is malformed, or the database refused a value
401No valid key, token or code
402The company's plan has no room left this month for what was asked. Nothing was deleted. See Plans and limits.
403Understood, and not allowed
404No such table, file, project or organization, or one you may not know exists
408The request took too long
409It conflicts with what is already there
429Too many requests. Wait a minute.
500Something went wrong on our side
502, 504One of your functions was stopped, crashed, or ran out of time
503A part this request needs is not set up

Every code

Keys and callers

CodeStatusMeaning
bad_key401No valid project key in the apikey header
sign_in_required401A publishable key with no user's token
signed_out401The token has ended. Sign in again.
organization_required400A secret key with no token must name the organization in x-organization-id
password_change_required403This account must choose a new password first
too_many_requests429The key, the network address, or sign-in attempts hit a limit

Plans

CodeStatusMeaning
limit_reached402The company has used all its plan includes of one thing this month (the message says which). Only that thing is refused; nothing was deleted.
slowed429The company reached its spending cap and chose to slow down rather than stop: this function ran less than ten seconds ago. Try again shortly. See Spending caps and alerts.
project_paused403A Free project that was not used for 7 days. Its data is kept. Resume it in the console.

Sign-in

CodeStatusMeaning
bad_login401Wrong email or password, or the account cannot sign in. It never says which.
code_required401The account uses an authenticator app. Send the same request again with the code.
bad_second_step401The authenticator code is not right
bad_code401A link or one-time code that has expired, was already used, or is not right
bad_state400A provider sign-in that has expired or was already used. Start again.
weak_password400Shorter than 12 characters, or longer than 200
email_in_use409That email already has an account
signup_closed403The project does not let people create their own accounts
method_off403The project does not use that way of signing in
confirm_first403Send the current password, or confirm it is you first
redirect_not_allowed, bad_redirect400That return address is not on the project's list
site_url_required409The project has no Site URL to send people back to
not_configured503That sign-in provider is not set up
email_not_ready503Email is not set up for the project

Data

CodeStatusMeaning
bad_request400An unknown column, a malformed filter, a wrong type or format, a missing required value, a value a constraint refuses
filter_required400PATCH and DELETE need a filter
not_allowed403The application may not do that to this table, or the row is outside what this account may write
not_found404No such table
conflict409A row with that value already exists, or it refers to a row that does not exist. The constraint is named.
timeout408The request took too long

Storage

CodeStatusMeaning
not_accepted400The bucket's settings refuse this file
server_only403Only your own server may add or remove files in this bucket
bad_link403A signed link that has expired or is not valid
not_found404No such file

Functions

CodeStatusMeaning
not_found404No such function in this project, or it is switched off
sign_in_required401The function takes signed-in users only
busy429Too many of the project's functions are running at once
function_error500The code threw. The error is in the function's log.
function_memory502Stopped for using too much memory
function_output502Stopped for printing or returning too much
function_crashed502Ended without answering
function_timeout504Stopped at its time limit

Tools (personal access tokens)

CodeStatusMeaning
bad_token401Missing, wrong, revoked or expired token
read_only403The token is look-only, or your role is read-only
network_not_allowed403The project accepts its keys and tokens only from listed network addresses, and yours is not one. See Database settings
not_permitted403The token or connection was not given the part of Rezin Core this belongs to
deploy_not_permitted403Deploying, changing or deleting a function needs the separate deploy permission
sql_error400The database refused the statement
no_organization409The project has no organization yet
sql_not_ready503The project's SQL role is not available

Everything else

CodeStatusMeaning
server_error500Something went wrong on our side. Nothing about the cause is in the answer.
method_not_allowed405GET /mcp; the connector takes POST

Handling them well

  • On 401 signed_out, send the person to sign in again. There is no refresh token.
  • On 401 code_required, ask for the code and send the same request again. Nothing was used up.
  • On 429, wait a minute before trying again. Do not retry in a tight loop.
  • On 403 not_allowed for a table you just made: it has no policy yet, or the application has not been allowed to use it. See Row-level security and policies.
  • An empty rows list is not an error. It usually means the caller's policies let nothing through.

This page as Markdown · llms.txt · Rezin Core is in development and available by invitation.