lib/apia/endpoint.rb
# Catch any runtime errors and update the given response with the appropriate
# values.
#
# @param response [Apia::Response]
# @return [void]
Catch any runtime errors and update the given response with the appropriate
values.
Catch any runtime errors and update the given response with the appropriate values .
def catch_errors(response)
        yield
      rescue Apia::RuntimeError => e
        catch_errors(response) do
          response.body = { error: e.hash }
          response.status = e.http_status
          response.headers['x-api-schema'] = 'json-error'
        end
      end
def catch_errors ( response ) yield rescue Apia :: RuntimeError => e catch_errors ( response ) do response . body = { error : e . hash } response . status = e . http_status response . headers [ 'x-api-schema' ] = 'json-error' end end
Catch any runtime errors and update the given response with the appropriate
values.
Catch any runtime errors and update the given response with the appropriate values .
None
void
response
<not_specific>
<not_specific>
None