How to use the RequestTimeout function from http-errors
Find comprehensive JavaScript http-errors.RequestTimeout code examples handpicked from public code repositorys.
47 48 49 50 51 52 53 54 55 56
proxyAuthenticationRequired: function proxyAuthenticationRequired (message) { return new createError.ProxyAuthenticationRequired(message) }, requestTimeout: function requestTimeout (message) { return new createError.RequestTimeout(message) }, conflict: function conflict (message) { return new createError.Conflict(message)
30
340
17
+ 55 other calls in file
GitHub: nxtedition/nxt-lib
73 74 75 76 77 78 79 80 81 82
resolve(null) } }) .on('error', reject) .on('timeout', () => { reject(new createError.RequestTimeout()) }) }), next().catch((err) => { if (!res.headersSent) {
4
3
5
+ 39 other calls in file
148 149 150 151 152 153 154 155 156 157
module.exports.Forbidden = new HTTPErrors.Forbidden() module.exports.NotFound = new HTTPErrors.NotFound() module.exports.MethodNotAllowed = new HTTPErrors.MethodNotAllowed() module.exports.NotAcceptable = new HTTPErrors.NotAcceptable() module.exports.ProxyAuthenticationRequired = new HTTPErrors.ProxyAuthenticationRequired() module.exports.RequestTimeout = new HTTPErrors.RequestTimeout() module.exports.Conflict = new HTTPErrors.Conflict() module.exports.Gone = new HTTPErrors.Gone() module.exports.LengthRequired = new HTTPErrors.LengthRequired() module.exports.PreconditionFailed = new HTTPErrors.PreconditionFailed()
1
0
7
+ 41 other calls in file
81 82 83 84 85 86 87 88 89 90
case 407: { httpError = createError.ProxyAuthenticationRequired(); break; } case 408: { httpError = createError.RequestTimeout(); break; } case 409: { httpError = createError.Conflict();
0
0
2
+ 41 other calls in file
http-errors.NotFound is the most popular function in http-errors (1819 examples)