Formidable: Now return 400 BadRequest HttpError instead of generic error.
continuous-integration/appveyor/branch AppVeyor build failed Details

master
Jonatan Nilsson 2023-01-26 09:23:10 +00:00
parent 2b69013c04
commit 74771d92cf
2 changed files with 2 additions and 2 deletions

View File

@ -237,7 +237,7 @@ export function FormidableHandler(formidable, org = {}) {
return new Promise(function(res, rej) {
form.parse(ctx.req, function(err, fields, files) {
if (err) return rej(err)
if (err) return rej(new HttpError(400, err.message))
if (opts.parseFields) {
Object.keys(fields).forEach(function(key) {

View File

@ -1,6 +1,6 @@
{
"name": "flaska",
"version": "1.3.1",
"version": "1.3.2",
"description": "Flaska is a micro web-framework for node. It is designed to be fast, simple and lightweight, and is distributed as a single file module with no dependencies.",
"main": "flaska.mjs",
"scripts": {