Castra ยท Problem types

Problem types

Every error a Castra API returns has a type of the form https://castra.mehmetozer.dev/problems/<code>. Clients can branch on it; it does not change between releases.

audit_failed500The MCP call could not be written to the audit log, so it was not served.
conflict409The row changed while your update was running.
constraint409The write violates a database constraint.
forbidden403You are signed in, but the policy does not allow this operation for you.
insufficient_scope403The MCP token does not have the scope this tool needs.
internal500An unexpected error. The response never contains SQL, parameters or stack traces.
invalid_body400The request body is not usable.
invalid_cursor400The pagination cursor is not valid for this request.
invalid_filter400A filter in the query string cannot be used.
invalid_identity400The MCP as argument is not a valid identity.
invalid_include400An include names a relation that is not available to you.
invalid_input400The policy engine rejected the input before checking any rule.
invalid_reference400A foreign key column points at a row that does not exist.
invalid_request400The query string or request shape is not valid.
invalid_sort400The order parameter names a column you cannot sort on.
invalid_value400A value does not match its column type.
method_not_allowed405The HTTP method is not supported on this path.
missing_column400A required column (NOT NULL, no default) is missing from the create body.
not_found404The table, row or route does not exist, or you are not allowed to know that it exists.
payload_too_large413The request body is larger than the limit (1 MiB for REST and /mcp).
readonly_column400The body tries to change a column that cannot be changed.
roles_not_allowed400The remote /mcp server does not accept as.roles.
server_column400The body sets a column the server fills in.
unauthenticated401This operation needs a signed-in user, API key or MCP token, and the request had none (or an invalid one).
unknown_column400The body or query names a column that does not exist for you.
unknown_role400MCP as.roles names a role that is not in the config.
unknown_user400MCP as.userId does not name an existing user.
unsafe_schema403Creates and updates are disabled on this table for everyone, because its schema can silently delete rows.
unsupported_media_type415The request body is not JSON.
write_check_failed403The row as stored would not satisfy the policy, so the write was rolled back.
write_unavailable500Writes are disabled because the Worker has no D1 binding.