class Pragma::Operation::Response::Forbidden

Represents the 403 Forbidden HTTP response.

Public Class Methods

new( entity: Error.new( error_type: :forbidden, error_message: 'You are not authorized to access the requested resource.' ), headers: {} ) click to toggle source

Initializes the response.

@param entity [Object] the response's entity @param headers [Hash] the response's headers

Calls superclass method Pragma::Operation::Response::new
# File lib/pragma/operation/response/forbidden.rb, line 12
def initialize(
  entity: Error.new(
    error_type: :forbidden,
    error_message: 'You are not authorized to access the requested resource.'
  ),
  headers: {}
)
  super(status: 403, entity: entity, headers: headers)
end