Skip to content

Commit 491bd1d

Browse files
author
Adam Rutland
committed
Fix for when actual error and no result.
1 parent 473a8cb commit 491bd1d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/datapacks.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -264,9 +264,9 @@ DataPacks.prototype.runDataPackProcess = function(dataPackData, options, onSucce
264264
self.vlocity.jsForceConnection.apex.post(self.dataPacksEndpoint(), dataPackData, function(err, result) {
265265

266266
if (err) {
267-
VlocityUtils.verbose('Error', result);
267+
VlocityUtils.verbose('Error', result, err);
268268

269-
if (result.Message && result.Message.indexOf('STORAGE_LIMIT_EXCEEDED') != -1) {
269+
if (result && result.Message && result.Message.indexOf('STORAGE_LIMIT_EXCEEDED') != -1) {
270270
throw self.getStorageLimitExceededError();
271271
}
272272

0 commit comments

Comments
 (0)