lib/pragma/operation/response/unauthorized.rb in pragma-operation-2.1.0 vs lib/pragma/operation/response/unauthorized.rb in pragma-operation-2.2.0

- old
+ new

@@ -1,14 +1,19 @@ # frozen_string_literal: true module Pragma module Operation class Response + # Represents the 401 Unauthorized HTTP response. class Unauthorized < Response + # Initializes the response. + # + # @param entity [Object] the response's entity + # @param headers [Hash] the response's headers def initialize( entity: Error.new( error_type: :unauthorized, - error_message: 'This resource requires authentication.', + error_message: 'This resource requires authentication.' ), headers: {} ) super(status: 401, entity: entity, headers: headers) end