Skip to content

Commit

Permalink
Improved error message when data object is invalid
Browse files Browse the repository at this point in the history
  • Loading branch information
d4nyll committed Aug 25, 2017
1 parent f315884 commit ac54f91
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ Revoice.generateInvoice = function (data = {}, options = Revoice.DEFAULT_OPTIONS
const isValidInvoiceDataObject = Revoice.validateInvoiceDataObject(data);

if (!isValidInvoiceDataObject) {
reject(new Error(errorStrings.INVALID_DATA_OBJECT + isValidInvoiceDataObject))
reject(new Error(errorStrings.INVALID_DATA_OBJECT + ". " + isValidInvoiceDataObject))
}

// Get the template and substitute the values in
Expand Down

0 comments on commit ac54f91

Please sign in to comment.