     Promise.reject(error) if isError(error)
 
   handleErrorMessage: (error) =>
-    {statusText, data} = error.response
+    {statusText, data} = error.response if isObject(error.response)
 
     try
       msg = JSON.parse(statusText)


  filterErrors: (error) =>
    {response, config} = error
    {data} = response
    return Promise.reject(error) if isEmpty(config)

    if isEmpty(config.handledErrors) or
      not areAllErrorsHandled(config.handledErrors, data.errors, @_apiHandler.getOptions().errorNameProperty)
        Promise.reject(error)
    else
      response

some      = require 'lodash/some'
set       = require 'lodash/set'
every     = require 'lodash/every'
isObject  = require 'lodash/isObject'
isError   = require 'lodash/isError'
isEmpty   = require 'lodash/isEmpty'
propertyOf  = require 'lodash/propertyOf'
