Skip to content

Commit

Permalink
docs: fix highlight
Browse files Browse the repository at this point in the history
  • Loading branch information
posva committed May 21, 2024
1 parent 29f859c commit bb8b71d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/rfcs/data-loaders/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -631,7 +631,7 @@ This is still not implemented.

Since throwing an error in a loader cancels the navigation, this doesn't allow to have an error property in _non lazy loaders_ to display the error in the UI. To solve this, we can specify expected errors when defining the loader:

```ts{17-19}
```ts{2-7,14-16}
// custom error class
class MyError extends Error {
name = 'MyError' // Displays in logs instead of 'Error'
Expand All @@ -654,7 +654,7 @@ export const useUserData = defineLoader(

These can also be specified globally:

```ts
```ts{11-13}
class MyError extends Error {
name = 'MyError'
constructor(message: string) {
Expand Down

0 comments on commit bb8b71d

Please sign in to comment.