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
Copy file name to clipboardExpand all lines: README.md
+41-7Lines changed: 41 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -86,13 +86,47 @@ is added automatically to requests. Defaults to `false`.
86
86
87
87
-`useLocalizedMenuEndpoint`: If enabled, the menu endpoint will use a language prefix as configured by [nuxtjs/i18n](https://v8.i18n.nuxtjs.org) module. Defaults to `true`.
88
88
89
-
90
-
## TODO - List of 1.x options not yet implemented
91
-
92
-
-`pageErrorHandler`: The default page error handler can be overridden.
93
-
94
-
-`menuErrorHandler`: The default menu error handler can be overridden.
95
-
89
+
## Error handling
90
+
91
+
The module provides a default error handler for the `fetchPage` and `fetchMenu` methods:
92
+
93
+
-`fetchPage`: Throws an error with the status code and message provided by Drupal.
94
+
-`fetchMenu`: Logs an error message to the console and displays a message in the frontend.
95
+
96
+
## Customizing error handling
97
+
98
+
You have the option to override the default error handlers by using a parameter when calling the `fetch` methods.
0 commit comments