Exception: Basecamp::ForbiddenError
- Defined in:
- lib/basecamp/forbidden_error.rb
Overview
Raised when access is denied (403).
Class Method Summary collapse
-
.insufficient_scope ⇒ Object
Creates a forbidden error due to insufficient OAuth scope.
Instance Method Summary collapse
-
#initialize(message = "Access denied", hint: nil) ⇒ ForbiddenError
constructor
A new instance of ForbiddenError.
Constructor Details
#initialize(message = "Access denied", hint: nil) ⇒ ForbiddenError
Returns a new instance of ForbiddenError.
6 7 8 9 10 11 12 13 |
# File 'lib/basecamp/forbidden_error.rb', line 6 def initialize( = "Access denied", hint: nil) super( code: ErrorCode::FORBIDDEN, message: , hint: hint || "You do not have permission to access this resource", http_status: 403 ) end |
Class Method Details
.insufficient_scope ⇒ Object
Creates a forbidden error due to insufficient OAuth scope.
16 17 18 |
# File 'lib/basecamp/forbidden_error.rb', line 16 def self.insufficient_scope new("Access denied: insufficient scope", hint: "Re-authenticate with full scope") end |