We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5e94455 commit 64ba7c4Copy full SHA for 64ba7c4
lib/nano.js
@@ -14,7 +14,6 @@ const { URL } = require('url')
14
const assert = require('assert')
15
const querystring = require('qs')
16
const axios = require('axios').default
17
-const INVALID_PARAMETERS_ERROR = new Error('Invalid parameters')
18
const stream = require('stream')
19
const http = require('http')
20
const https = require('https')
@@ -47,7 +46,7 @@ function missing (...params) {
47
46
}
48
49
// calls the supplied callback or if not supplied, returns a rejected promise
50
-function callbackOrRejectError (callback, error = INVALID_PARAMETERS_ERROR) {
+function callbackOrRejectError (callback, error = new Error('Invalid parameters')) {
51
if (callback) {
52
return callback(error, null)
53
} else {
0 commit comments