Exception: RestApiGenerator::CustomError
- Inherits:
-
StandardError
- Object
- StandardError
- RestApiGenerator::CustomError
- Defined in:
- lib/rest_api_generator/custom_error.rb
Instance Attribute Summary collapse
-
#error ⇒ Object
readonly
Returns the value of attribute error.
-
#message ⇒ Object
readonly
Returns the value of attribute message.
-
#status ⇒ Object
readonly
Returns the value of attribute status.
Instance Method Summary collapse
- #fetch_json ⇒ Object
-
#initialize(error: 422, status: :unprocessable_entity, message: "Something went wrong") ⇒ CustomError
constructor
A new instance of CustomError.
Constructor Details
#initialize(error: 422, status: :unprocessable_entity, message: "Something went wrong") ⇒ CustomError
Returns a new instance of CustomError.
7 8 9 10 11 12 |
# File 'lib/rest_api_generator/custom_error.rb', line 7 def initialize(error: 422, status: :unprocessable_entity, message: "Something went wrong") @error = error @status = status @message = super(msg: ) end |
Instance Attribute Details
#error ⇒ Object (readonly)
Returns the value of attribute error.
5 6 7 |
# File 'lib/rest_api_generator/custom_error.rb', line 5 def error @error end |
#message ⇒ Object (readonly)
Returns the value of attribute message.
5 6 7 |
# File 'lib/rest_api_generator/custom_error.rb', line 5 def @message end |
#status ⇒ Object (readonly)
Returns the value of attribute status.
5 6 7 |
# File 'lib/rest_api_generator/custom_error.rb', line 5 def status @status end |