@haxotsoa/tsoa-auth-user-space-project
v0.2.4
Published
```typescript //insert into app.ts if (err instanceof InputValidationError) { return res.status(err.status).json({ message: err.message, details: err.fields, }); } ```
Downloads
2
Readme
tsoa-base-service
Errors
InputValidationError
//insert into app.ts
if (err instanceof InputValidationError) {
return res.status(err.status).json({
message: err.message,
details: err.fields,
});
}
Použití:
throw new InputValidationError("Your input is not valid.");
nebo:
throw new InputValidationError("Your input is not valid.", 400, { type: "SomeType", code: "SomeCode" });