lib/pragma/operation/response/internal_server_error.rb in pragma-operation-2.1.0 vs lib/pragma/operation/response/internal_server_error.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 500 Internal Server Error HTTP response.
class InternalServerError < 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: :internal_server_error,
- error_message: 'There was an error processing your request.',
+ error_message: 'There was an error processing your request.'
),
headers: {}
)
super(status: 500, entity: entity, headers: headers)
end