Exception: Server::ClientError

Inherits:
StandardError
  • Object
show all
Defined in:
app/server.rb

Overview

An error message and status code.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(message, status: 400) ⇒ ClientError

Returns a new instance of ClientError.



33
34
35
36
# File 'app/server.rb', line 33

def initialize(message, status: 400)
  super(message)
  @status = status
end

Instance Attribute Details

#statusObject (readonly)

Returns the value of attribute status.



31
32
33
# File 'app/server.rb', line 31

def status
  @status
end