Module: Temescal::Response
- Defined in:
- lib/temescal/response.rb
Class Method Summary collapse
-
.build(error) ⇒ Object
Public: Builds a response body for the Rack response.
Class Method Details
.build(error) ⇒ Object
Public: Builds a response body for the Rack response.
error - The Temescal::Error object representing the caught exception.
Returns an Array containing a JSON string as the response body.
11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/temescal/response.rb', line 11 def self.build(error) [ { $_temescal_configuration. => { status: error.status, error: error.type, message: error. } }.to_json ] end |