Exception: Ashikawa::Core::ClientError

Inherits:
RuntimeError
  • Object
show all
Defined in:
lib/ashikawa-core/exceptions/client_error.rb

Overview

The client had an error in the request

Instance Method Summary collapse

Constructor Details

#initialize(message = nil) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Create a new instance

Parameters:

  • message (String) (defaults to: nil)

    The error message



11
12
13
# File 'lib/ashikawa-core/exceptions/client_error.rb', line 11

def initialize(message = nil)
  super(message || default_error_message)
end

Instance Method Details

#default_error_messageObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

The default error message to be used. Can be overridden by sub classed

Returns:

  • String the default error message



19
20
21
# File 'lib/ashikawa-core/exceptions/client_error.rb', line 19

def default_error_message
  '400 Bad Request'
end