class Pragma::Operation::Response::ServiceUnavailable

Represents the 503 Service Unavailable HTTP response.

Public Class Methods

new( entity: Error.new( error_type: :service_unavailable, error_message: 'This resource is not available right now. Try later.' ), 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/service_unavailable.rb, line 12
def initialize(
  entity: Error.new(
    error_type: :service_unavailable,
    error_message: 'This resource is not available right now. Try later.'
  ),
  headers: {}
)
  super(status: 503, entity: entity, headers: headers)
end