Skip to content

API Error Codes

BarakoCMS uses standard HTTP status codes.

CodeMeaningContext
200OKRequest succeeded.
201CreatedResource created successfully.
204No ContentAction succeeded but returns no data.
400Bad RequestValidation failed. See errors array in response.
401UnauthorizedMissing or invalid JWT token.
403ForbiddenValid token, but insufficient RBAC permissions.
404Not FoundResource ID does not exist.
409ConflictDuplicate request (Idempotency) or unique constraint violation.
412Precondition FailedOptimistic Concurrency conflict (Version mismatch).
500Internal Server ErrorSomething went wrong on the server. Check logs.

Problem Details Format

Errors are returned in RFC 7807 format:

json
{
  "type": "https://tools.ietf.org/html/rfc7231#section-6.5.1",
  "title": "One or more validation errors occurred.",
  "status": 400,
  "errors": {
    "Data.Email": [
      "'Email' is not a valid email address."
    ]
  }
}

Brewed in the baryo ☕ · Released under the MIT License.