docs: use ts for create-error example (#28411)

This commit is contained in:
Sébastien Chopin 2024-08-05 17:33:39 +02:00 committed by Daniel Roe
parent 8840199e5f
commit fbdf4f3465
No known key found for this signature in database
GPG Key ID: CBC814C393D93268

View File

@ -41,7 +41,7 @@ Use `createError` to trigger error handling in server API routes.
### Example
```js
```ts [server/api/error.ts]
export default eventHandler(() => {
throw createError({
statusCode: 404,