class Pragma::Operation::Response::InternalServerError

Represents the 500 Internal Server Error HTTP response.

Public Class Methods

new( entity: Error.new( error_type: :internal_server_error, error_message: 'There was an error processing your request.' ), 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/internal_server_error.rb, line 12
def initialize(
  entity: Error.new(
    error_type: :internal_server_error,
    error_message: 'There was an error processing your request.'
  ),
  headers: {}
)
  super(status: 500, entity: entity, headers: headers)
end