Exception: Fizzy::ForbiddenError

Inherits:
Error
  • Object
show all
Defined in:
lib/fizzy/errors.rb

Overview

Raised when access is denied (403).

Instance Attribute Summary

Attributes inherited from Error

#cause, #code, #hint, #http_status, #request_id, #retry_after, #retryable

Instance Method Summary collapse

Methods inherited from Error

#exit_code, exit_code_for, #retryable?

Constructor Details

#initialize(message = "Access denied", hint: nil) ⇒ ForbiddenError

Returns a new instance of ForbiddenError.



151
152
153
154
155
156
157
158
# File 'lib/fizzy/errors.rb', line 151

def initialize(message = "Access denied", hint: nil)
  super(
    code: ErrorCode::FORBIDDEN,
    message: message,
    hint: hint || "You do not have permission to access this resource",
    http_status: 403
  )
end