@trayio/threadneedle
Advanced tools
Comparing version 1.12.1 to 1.13.0
@@ -9,3 +9,3 @@ const _ = require('lodash'); | ||
if (!methodName || !_.isString(methodName)) { | ||
throw new Error('The first parameter passed to `addMethod` should be a string.'); | ||
throw new Error(`The first parameter passed to 'addMethod' should be a string. Method: ${methodName}`); | ||
} | ||
@@ -18,3 +18,3 @@ // If a function is inputted as the `config`, then just return - there's | ||
if (!config || !_.isObject(config)) { | ||
throw new Error('The `config` object should be an object.'); | ||
throw new Error(`The 'config' object should be an object. Method: ${methodName}`); | ||
} | ||
@@ -29,3 +29,3 @@ | ||
if (!config.url && config.url !== '') { | ||
throw new Error('The `url` config parameter should be declared.'); | ||
throw new Error(`The 'url' config parameter should be declared. Method: ${methodName}`); | ||
} | ||
@@ -44,5 +44,5 @@ | ||
} else if (!_.isFunction(method)) { | ||
throw new Error('The `method` parameter needs to be provided in the method configuration.'); | ||
throw new Error(`The 'method' parameter needs to be provided in the method configuration. Method: ${methodName}`); | ||
} | ||
}; |
@@ -7,3 +7,3 @@ var _ = require('lodash'); | ||
if (!methodName || !_.isString(methodName)) { | ||
throw new Error('The first parameter passed to `addMethod` should be a string.'); | ||
throw new Error(`The first parameter passed to 'addMethod' should be a string. Method: ${methodName}`); | ||
} | ||
@@ -16,3 +16,3 @@ // If a function is inputted as the `config`, then just return - there's | ||
if (!config || !_.isObject(config)) { | ||
throw new Error('The `config` object should be an object.'); | ||
throw new Error(`The 'config' object should be an object. Method: ${methodName}`); | ||
} | ||
@@ -27,3 +27,3 @@ | ||
if (!config.method) { | ||
throw new Error('The `method` config parameter should be declared.'); | ||
throw new Error(`The 'method' config parameter should be declared. Method: ${methodName}`); | ||
} | ||
@@ -30,0 +30,0 @@ |
{ | ||
"name": "@trayio/threadneedle", | ||
"version": "1.12.1", | ||
"version": "1.13.0", | ||
"description": "A framework for simplifying working with HTTP-based APIs.", | ||
@@ -44,5 +44,4 @@ "main": "lib/index.js", | ||
"grunt-mocha-test": "^0.13.3", | ||
"mocha": "~7.2.0", | ||
"mocha-unfunk-reporter": "^0.4.0" | ||
"mocha": "~7.2.0" | ||
} | ||
} |
74555
7