             humanReadable = JSON.stringify body, null, '  '
             deferred.reject "Problem on #{action}ing product:\n" + humanReadable
         else
-          deferred.reject "Problem on #{action}ing product (code #{response.statusCode}): " + body
+          humanReadable = JSON.stringify body, null, '  '
+          deferred.reject "Problem on #{action}ing product (code #{response.statusCode}): " + humanReadable
 
     deferred.promise
 

          humanReadable = JSON.stringify body, null, '  '
          deferred.resolve "Problem on updating product:\n" + humanReadable
        else
          deferred.reject 'Problem on updating product: ' + body

    deferred.promise


          humanReadable = JSON.stringify body, null, '  '
          deferred.reject "Problem on creating new product:\n" + humanReadable
        else
          humanReadable = JSON.stringify body, null, '  '
          deferred.reject 'Error on creating new product: ' + humanReadable

    deferred.promise

