How to use the FailedDependency function from http-errors
Find comprehensive JavaScript http-errors.FailedDependency code examples handpicked from public code repositorys.
103 104 105 106 107 108 109 110 111 112
locked: function locked (message) { return new createError.Locked(message) }, failedDependency: function failedDependency (message) { return new createError.FailedDependency(message) }, tooEarly: function tooEarly (message) { return new createError.TooEarly(message)
30
340
17
+ 55 other calls in file
17 18 19 20 21 22 23 24 25 26
const iv = crypto.randomBytes(16) module.exports = { encrypt: async (iterationNum = 15, data) => { return new Promise((resolve, reject) => { if (typeof data === 'function') reject(new createErrors.FailedDependency('Type of function is not supported')) const { encryptString } = new StringCrypto({ salt: ENCRYPTION_SALT, iterations: iterationNum,
4
2
1
162 163 164 165 166 167 168 169 170 171
module.exports.ExpectationFailed = new HTTPErrors.ExpectationFailed() module.exports.ImATeapot = new HTTPErrors.ImATeapot() module.exports.MisdirectedRequest = new HTTPErrors.MisdirectedRequest() module.exports.UnprocessableEntity = new HTTPErrors.UnprocessableEntity() module.exports.Locked = new HTTPErrors.Locked() module.exports.FailedDependency = new HTTPErrors.FailedDependency() module.exports.UnorderedCollection = new HTTPErrors.UnorderedCollection() module.exports.UpgradeRequired = new HTTPErrors.UpgradeRequired() module.exports.PreconditionRequired = new HTTPErrors.PreconditionRequired() module.exports.TooManyRequests = new HTTPErrors.TooManyRequests()
1
0
7
+ 41 other calls in file
137 138 139 140 141 142 143 144 145 146
case 423: { httpError = createError.Locked(); break; } case 424: { httpError = createError.FailedDependency(); break; } case 425: { httpError = createError.UnorderedCollection();
0
0
2
+ 41 other calls in file
http-errors.NotFound is the most popular function in http-errors (1819 examples)