PLT-4635 Fix Cannot read property 'body' of undefined (#4629)

* Fix Cannot read property 'body' of undefined

* return if an error was found
Этот коммит содержится в:
enahum
2016-11-22 13:23:48 -03:00
коммит произвёл Corey Hulen
родитель e1fca412fc
Коммит 1a134efc65

Просмотреть файл

@@ -201,12 +201,12 @@ export default class Client {
if (errorCallback) {
errorCallback(e, err, res);
return;
}
return;
}
if (successCallback) {
if (res.body) {
if (res && res.body) {
successCallback(res.body, res);
} else {
console.error('Missing response body for ' + methodName); // eslint-disable-line no-console