How to use the PayloadTooLarge function from http-errors
Find comprehensive JavaScript http-errors.PayloadTooLarge code examples handpicked from public code repositorys.
67 68 69 70 71 72 73 74 75 76
preconditionFailed: function preconditionFailed (message) { return new createError.PreconditionFailed(message) }, payloadTooLarge: function payloadTooLarge (message) { return new createError.PayloadTooLarge(message) }, uriTooLong: function uriTooLong (message) { return new createError.URITooLong(message)
30
340
17
+ 55 other calls in file
GitHub: mfolkeseth/core
113 114 115 116 117 118 119 120 121 122
file.once('limit', () => { this._log.info( `multipart - Uploaded package exceeds legal file size limit - Field: ${fieldname} - Filename: ${filename}`, ); file.emit('error', new HttpError.PayloadTooLarge()); }); const extract = new tar.Parse({ strict: true,
2
1
1
94 95 96 97 98 99 100 101 102 103
"At least one of the user's vote is missing" ) module.exports.VoteAlreadySubmited = new HTTPErrors.PreconditionFailed( "This right holder's vote has already been submited and cannot be submited again" ) module.exports.FileTooLarge = new HTTPErrors.PayloadTooLarge( 'File is to large too be uploaded' ) /* Address related errors */
1
0
7
+ 83 other calls in file
101 102 103 104 105 106 107 108 109 110
case 412: { httpError = createError.PreconditionFailed(); break; } case 413: { httpError = createError.PayloadTooLarge(); break; } case 414: { httpError = createError.URITooLong();
0
0
2
+ 41 other calls in file
http-errors.NotFound is the most popular function in http-errors (1819 examples)