messagebird
Advanced tools
Comparing version 2.1.3 to 2.1.4
@@ -131,3 +131,6 @@ /** | ||
if (data.errors) { | ||
error = new Error('api error'); | ||
var clientErrors = data.errors.map(function (e) { | ||
return e.description + ' (code: ' + e.code + (e.parameter ? ', parameter: ' + e.parameter : '') + ')'; | ||
}); | ||
error = new Error('api error(s): ' + clientErrors.join(', ')); | ||
error.statusCode = response.statusCode; | ||
@@ -134,0 +137,0 @@ error.errors = data.errors; |
@@ -175,3 +175,3 @@ var fs = require('fs'); | ||
['type', err instanceof Error], | ||
['message', err.message === 'api error'], | ||
['message', err.message === 'api error(s): no (correct) recipients found (code: 9, parameter: recipients), originator is required (code: 9, parameter: originator)'], | ||
['errors', err.errors instanceof Array] | ||
@@ -213,3 +213,3 @@ ]); | ||
['type', err instanceof Error], | ||
['.message', err.message === 'api error'], | ||
['.message', err.message === 'api error(s): message not found (code: 20)'], | ||
['.errors', err.errors instanceof Array] | ||
@@ -245,3 +245,3 @@ ]); | ||
['type', err instanceof Error], | ||
['.message', err.message === 'api error'], | ||
['.message', err.message === 'api error(s): message not found (code: 20)'], | ||
['.errors', err.errors instanceof Array] | ||
@@ -281,3 +281,3 @@ ]); | ||
['type', err instanceof Error], | ||
['.message', err.message === 'api error'], | ||
['.message', err.message === 'api error(s): hlr not found (code: 20)'], | ||
['.errors', err.errors instanceof Array] | ||
@@ -359,3 +359,3 @@ ]); | ||
['type', err instanceof Error], | ||
['.message', err.message === 'api error'], | ||
['.message', err.message === 'api error(s): Not found (hlr not found) (code: 20)'], | ||
['.errors', err.errors instanceof Array] | ||
@@ -362,0 +362,0 @@ ]); |
{ | ||
"name": "messagebird", | ||
"version": "2.1.3", | ||
"version": "2.1.4", | ||
"description": "A node.js wrapper for the MessageBird REST API", | ||
@@ -5,0 +5,0 @@ "main": "lib/messagebird.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
29299
785