Exception: LabelZoom::ForbiddenError
- Defined in:
- lib/labelzoom/errors.rb
Overview
HTTP 403. The credential is valid but not entitled to this operation.
Instance Attribute Summary
Attributes inherited from APIError
#raw_body, #request_id, #status
Instance Method Summary collapse
-
#initialize(message, paid_feature: false, **kwargs) ⇒ ForbiddenError
constructor
A new instance of ForbiddenError.
-
#paid_feature? ⇒ Boolean
True when this 403 is a paywall rather than a permissions problem -- "JSON export is a paid feature" and friends.
Constructor Details
#initialize(message, paid_feature: false, **kwargs) ⇒ ForbiddenError
Returns a new instance of ForbiddenError.
39 40 41 42 |
# File 'lib/labelzoom/errors.rb', line 39 def initialize(, paid_feature: false, **kwargs) super(, **kwargs) @paid_feature = paid_feature end |
Instance Method Details
#paid_feature? ⇒ Boolean
True when this 403 is a paywall rather than a permissions problem -- "JSON export is a paid feature" and friends. By far the most common anonymous-tier failure, so it gets a predicate instead of leaving callers to match strings.
47 |
# File 'lib/labelzoom/errors.rb', line 47 def paid_feature? = @paid_feature |