class Pragma::Operation::Response::NotFound

Represents the 404 Not Found HTTP response.

Public Class Methods

new( entity: Error.new( error_type: :not_found, error_message: 'The requested resource could not be found.' ), 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/not_found.rb, line 12
def initialize(
  entity: Error.new(
    error_type: :not_found,
    error_message: 'The requested resource could not be found.'
  ),
  headers: {}
)
  super(status: 404, entity: entity, headers: headers)
end