Module: Rubino::Database

Defined in:
lib/rubino/errors.rb,
lib/rubino/database/migrator.rb,
lib/rubino/database/connection.rb

Overview

HTTP-boundary error hierarchy. Each class maps to a single HTTP status used by the API layer to translate exceptions to responses.

Rubino::Error                       — base class (defined in lib/rubino.rb)
NotFoundError(resource, id)          — 404
ValidationError(message, details:)   — 422
UnauthorizedError(message)           — 401
ConflictError(message)               — 409
UpstreamError(message, service:)     — 502

All message-first classes accept raise Class, "msg" (Ruby's idiomatic form) without losing data. NotFoundError keeps its (resource, id) shape because the message format depends on both values; always use raise NotFoundError.new("session", id), not raise NotFoundError, "...".

Domain errors (ConfigurationError, SessionError, ToolError, CompactionError) also subclass Error and live in lib/rubino.rb.

Defined Under Namespace

Classes: BusyError, Connection, Migrator