Class: Drillbit::Responses::InvalidSubdomain
- Inherits:
-
Object
- Object
- Drillbit::Responses::InvalidSubdomain
- Defined in:
- lib/drillbit/responses/invalid_subdomain.rb
Class Method Summary collapse
-
.call(env) ⇒ Object
rubocop:disable Style/InlineComment.
Class Method Details
.call(env) ⇒ Object
rubocop:disable Style/InlineComment
9 10 11 12 13 14 15 16 17 |
# File 'lib/drillbit/responses/invalid_subdomain.rb', line 9 def self.call(env) error = Drillbit::Errors::InvalidSubdomain.new(http_host: env['HTTP_HOST']) [ error.http_status, # HTTP Status Code {}, # Response Headers ["{\"errors\": [#{error.to_json}]}"], # Message ] end |