Exception: Sqlx::RecordNotFound
- Defined in:
- runtime/sqlx/errors.rb,
runtime/sqlx/errors.rbs
Overview
Raised when a lookup finds no matching row. Sqlx::Base.find_by!
and find raise it (message derived from table_name); apps also
raise it directly for an absent record and rescue it to map the miss to
an HTTP 404 at dispatch.
Instance Method Summary collapse
-
#initialize(message = "Sqlx::RecordNotFound") ⇒ RecordNotFound
constructor
The default message is explicit so every build answers the same string.
Constructor Details
#initialize(message = "Sqlx::RecordNotFound") ⇒ RecordNotFound
The default message is explicit so every build answers the same string.
15 |
# File 'runtime/sqlx/errors.rb', line 15
def initialize: (?String message) -> void
|