You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
createError(code, message [, statusCode [, Base [, captureStackTrace]]])
20
20
```
21
21
22
22
-`code` (`string`, required) - The error code, you can access it later with `error.code`. For consistency, we recommend prefixing plugin error codes with `FST_`
23
23
-`message` (`string`, required) - The error message. You can also use interpolated strings for formatting the message.
24
24
-`statusCode` (`number`, optional) - The status code that Fastify will use if the error is sent via HTTP.
25
25
-`Base` (`ErrorConstructor`, optional) - The base error object that will be used. (eg `TypeError`, `RangeError`)
26
+
-`captureStackTrace` (`boolean`, optional) - Whether to capture the stack trace or not.
0 commit comments