Module: ErrorUtil

Defined in:
lib/ps_pop_client/tools/error_util.rb

Class Method Summary collapse

Class Method Details

.parse_response(e) ⇒ Object



2
3
4
5
6
7
8
# File 'lib/ps_pop_client/tools/error_util.rb', line 2

def self.parse_response(e)
  response = {
    status: (e.class == PSClient::Error) ?  e.code.to_i : 500,
    message: e.message
  }
  return response
end