Exception: Melaya::TierInsufficientError
- Inherits:
-
MelayaError
- Object
- StandardError
- MelayaError
- Melaya::TierInsufficientError
- Defined in:
- lib/melaya/errors.rb
Overview
Raised when the server returns { error: 'tier_insufficient' } (HTTP 403).
Check #tier for the minimum required tier string.
Instance Attribute Summary collapse
-
#tier ⇒ Object
readonly
Returns the value of attribute tier.
Attributes inherited from MelayaError
Instance Method Summary collapse
-
#initialize(tier: nil, body: nil) ⇒ TierInsufficientError
constructor
A new instance of TierInsufficientError.
Constructor Details
#initialize(tier: nil, body: nil) ⇒ TierInsufficientError
Returns a new instance of TierInsufficientError.
31 32 33 34 |
# File 'lib/melaya/errors.rb', line 31 def initialize(tier: nil, body: nil) @tier = tier super("Melaya: feature requires a higher tier (#{tier})", status: 403, code: "tier_insufficient", body: body) end |
Instance Attribute Details
#tier ⇒ Object (readonly)
Returns the value of attribute tier.
29 30 31 |
# File 'lib/melaya/errors.rb', line 29 def tier @tier end |