Skip to content

Commit a83c478

Browse files
authored
Update ActionParameterHandler.ts (typestack#1)
Parameter name in BadRequestError
1 parent 0ee97fd commit a83c478

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/ActionParameterHandler.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,11 +190,12 @@ export class ActionParameterHandler<T extends BaseDriver> {
190190
.catch((validationErrors: ValidationError[]) => {
191191
const error: any = new BadRequestError(`Invalid ${paramMetadata.type}, check 'errors' property for more info.`);
192192
error.errors = validationErrors;
193+
error.paramName = paramMetadata.name;
193194
throw error;
194195
});
195196
}
196197

197198
return value;
198199
}
199200

200-
}
201+
}

0 commit comments

Comments
 (0)