Exception: Clickwrap::CaptureRefused
- Defined in:
- lib/clickwrap/errors.rb
Overview
The family of refusals a PERSON can cause from a form: a stale or missing presentation, a submission that doesn't parse, a required box left empty. These are not application errors — they deserve a re-rendered form with a localized sentence, never a 500. One rescue covers the whole family:
rescue Clickwrap::CaptureRefused => refusal
redirect_to somewhere_path, alert: refusal.user_facing_message
Everything OUTSIDE this family (an evidence write failure above all) stays loud on purpose: infrastructure problems are yours to see, not the person's to absorb.
Direct Known Subclasses
Instance Method Summary collapse
-
#user_facing_message ⇒ Object
The localized sentence the gem's own screens show for this refusal — safe to put in front of a person, never a developer-facing message.
Instance Method Details
#user_facing_message ⇒ Object
The localized sentence the gem's own screens show for this refusal — safe to put in front of a person, never a developer-facing message.
50 51 52 |
# File 'lib/clickwrap/errors.rb', line 50 def I18n.t("clickwrap.errors.presentation_no_longer_valid") end |