-
-
Notifications
You must be signed in to change notification settings - Fork 7.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #10880 from max-mathieu/multer-errors
fix(express): Map missing multer error and map busboy errors
- Loading branch information
Showing
3 changed files
with
41 additions
and
4 deletions.
There are no files selected for viewing
10 changes: 10 additions & 0 deletions
10
packages/platform-express/multer/multer/multer.constants.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,19 @@ | ||
export const multerExceptions = { | ||
// from https://github.com/expressjs/multer/blob/master/lib/multer-error.js | ||
LIMIT_PART_COUNT: 'Too many parts', | ||
LIMIT_FILE_SIZE: 'File too large', | ||
LIMIT_FILE_COUNT: 'Too many files', | ||
LIMIT_FIELD_KEY: 'Field name too long', | ||
LIMIT_FIELD_VALUE: 'Field value too long', | ||
LIMIT_FIELD_COUNT: 'Too many fields', | ||
LIMIT_UNEXPECTED_FILE: 'Unexpected field', | ||
MISSING_FIELD_NAME: 'Field name missing', | ||
}; | ||
|
||
export const busboyExceptions = { | ||
// from https://github.com/mscdex/busboy/blob/master/lib/types/multipart.js | ||
MULTIPART_BOUNDARY_NOT_FOUND: 'Multipart: Boundary not found', | ||
MULTIPART_MALFORMED_PART_HEADER: 'Malformed part header', | ||
MULTIPART_UNEXPECTED_END_OF_FORM: 'Unexpected end of form', | ||
MULTIPART_UNEXPECTED_END_OF_FILE: 'Unexpected end of file', | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters