Quickback Docs

Errors

HTTP error responses and status codes returned by the generated API, organized by security layer.

The generated API returns structured error responses with consistent fields across all security layers.

Status Codes

CodeMeaningWhen
200OKSuccessful GET, PATCH, DELETE
201CreatedSuccessful POST
207Multi-StatusBatch operation with mixed results
400Bad RequestGuard violation, validation error, invalid input
401UnauthorizedMissing or expired authentication
403ForbiddenAccess denied (wrong role, condition failed) or firewall blocked it
404Not FoundRecord doesn't exist (or firewall blocked with errorMode: 'hide')
429Too Many RequestsRate limit exceeded

Error Response Format

All errors use a flat structure with contextual fields:

{
  "error": "Insufficient permissions",
  "layer": "access",
  "code": "ACCESS_ROLE_REQUIRED",
  "details": {
    "required": ["admin"],
    "current": ["member"]
  },
  "hint": "Contact an administrator to grant necessary permissions"
}
FieldTypeDescription
errorstringHuman-readable error message
layerstringSecurity layer that rejected the request
codestringMachine-readable error code
detailsobjectLayer-specific context (optional)
hintstringActionable guidance for resolution (optional)

Errors by Security Layer

Authentication (401)

Missing or invalid authentication tokens.

{
  "error": "Authentication required",
  "layer": "authentication",
  "code": "AUTH_MISSING",
  "hint": "Include Authorization header with Bearer token"
}

Error codes:

CodeDescription
AUTH_MISSINGNo Authorization header provided
AUTH_INVALID_TOKENToken is malformed or invalid
AUTH_EXPIREDToken has expired
AUTH_RATE_LIMITEDToo many auth attempts

Firewall (403)

Records outside the user's firewall scope return 403 Forbidden by default with a structured error:

{
  "error": "Record not found or not accessible",
  "layer": "firewall",
  "code": "FIREWALL_NOT_FOUND",
  "hint": "Check the record ID and your organization membership"
}

Firewall filtering is transparent — the query is scoped by WHERE organizationId = ? so inaccessible records simply don't appear in results.

Error codes:

CodeDescription
FIREWALL_NOT_FOUNDRecord not found behind firewall (wrong org, soft-deleted, or doesn't exist)
FIREWALL_ORG_ISOLATIONRecord belongs to a different organization
FIREWALL_USER_ISOLATIONRecord belongs to another user
FIREWALL_SOFT_DELETEDRecord has been soft deleted

For security-hardened deployments, set errorMode: 'hide' in your firewall config to return opaque 404 Not Found responses instead. This prevents attackers from distinguishing between "record exists but you can't access it" and "record doesn't exist".

Access (403)

Access violations return 403 Forbidden when the user's role doesn't match the required roles for the operation.

{
  "error": "Insufficient permissions",
  "layer": "access",
  "code": "ACCESS_ROLE_REQUIRED",
  "details": {
    "required": ["admin"],
    "current": ["member"]
  },
  "hint": "Contact an administrator to grant necessary permissions"
}

Error codes:

CodeDescription
ACCESS_ROLE_REQUIREDUser doesn't have the required role
ACCESS_CONDITION_FAILEDRecord-level access condition not met
ACCESS_OWNERSHIP_REQUIREDUser must own the record
ACCESS_NO_ORGNo active organization set

Guards (400)

Guard violations return 400 Bad Request when the request body contains fields that aren't allowed.

{
  "error": "Field cannot be set during creation",
  "layer": "guards",
  "code": "GUARD_FIELD_NOT_CREATEABLE",
  "details": {
    "fields": ["status"]
  },
  "hint": "These fields are set automatically or must be omitted"
}

Error codes:

CodeDescription
GUARD_FIELD_NOT_CREATEABLEField not in createable list
GUARD_FIELD_NOT_UPDATABLEField not in updatable list
GUARD_FIELD_PROTECTEDField is action-only (protected)
GUARD_FIELD_IMMUTABLEField cannot be modified after creation
GUARD_SYSTEM_MANAGEDSystem field (createdAt, modifiedAt, etc.)

Masking

Masking doesn't produce errors — it silently transforms field values in the response.

Batch Errors

Batch operations can return:

  • 201 — All records succeeded
  • 207 — Partial success (some records failed)
  • 400 — Atomic mode and at least one record failed (all rolled back)

Partial Success (207)

{
  "success": [{ "id": "room_1", "name": "Room A" }],
  "errors": [
    {
      "index": 1,
      "record": { "name": "Room B", "status": "active" },
      "error": {
        "error": "Field cannot be set during creation",
        "layer": "guards",
        "code": "GUARD_FIELD_NOT_CREATEABLE",
        "details": { "fields": ["status"] },
        "hint": "These fields are set automatically or must be omitted"
      }
    }
  ],
  "meta": { "total": 2, "succeeded": 1, "failed": 1, "atomic": false }
}

Atomic Failure (400)

{
  "error": "Batch operation failed in atomic mode",
  "layer": "validation",
  "code": "BATCH_ATOMIC_FAILED",
  "details": {
    "failedAt": 2,
    "reason": { "error": "Not found", "code": "NOT_FOUND" }
  },
  "hint": "Transaction rolled back. Fix the error and retry the entire batch."
}

Batch error codes:

CodeDescription
BATCH_SIZE_EXCEEDEDToo many records in a single request
BATCH_ATOMIC_FAILEDAtomic batch failed, all changes rolled back
BATCH_MISSING_IDSBatch update/delete missing required IDs

On this page