Exception: Rack::JsonSchema::ResponseValidation::InvalidResponseType

Inherits:
Error
  • Object
show all
Defined in:
lib/rack/json_schema/response_validation.rb

Instance Method Summary collapse

Methods inherited from Error

#to_rack_response

Constructor Details

#initialize(errors) ⇒ InvalidResponseType

Returns a new instance of InvalidResponseType.



124
125
126
# File 'lib/rack/json_schema/response_validation.rb', line 124

def initialize(errors)
  super ::JsonSchema::SchemaError.aggregate(errors).join(" ")
end

Instance Method Details

#idObject



128
129
130
# File 'lib/rack/json_schema/response_validation.rb', line 128

def id
  "invalid_response_type"
end

#statusObject



132
133
134
# File 'lib/rack/json_schema/response_validation.rb', line 132

def status
  500
end