diff --git a/documentation/docs/02-layouts.md b/documentation/docs/02-layouts.md index 2a889c2f1e01..6211e825b3d1 100644 --- a/documentation/docs/02-layouts.md +++ b/documentation/docs/02-layouts.md @@ -111,4 +111,6 @@ If an error component has a [`load`](#loading) function, it will be called with

{title}

``` +> Layout components also have access to `error` and `status` via the [page store](#modules-$app-stores) +> > Server-side stack traces will be removed from `error` in production, to avoid exposing privileged information to users. diff --git a/documentation/docs/05-modules.md b/documentation/docs/05-modules.md index d536dd0a0002..72b6068846bb 100644 --- a/documentation/docs/05-modules.md +++ b/documentation/docs/05-modules.md @@ -68,7 +68,7 @@ Because of that, the stores are not free-floating objects: they must be accessed The stores themselves attach to the correct context at the point of subscription, which means you can import and use them directly in components without boilerplate. However, it still needs to be called synchronously on component or page initialisation when the `$`-prefix isn't used. Use `getStores` to safely `.subscribe` asynchronously instead. - `navigating` is a [readable store](https://svelte.dev/tutorial/readable-stores). When navigating starts, its value is `{ from, to }`, where `from` and `to` are both [`URL`](https://developer.mozilla.org/en-US/docs/Web/API/URL) instances. When navigating finishes, its value reverts to `null`. -- `page` contains an object with the current [`url`](https://developer.mozilla.org/en-US/docs/Web/API/URL), [`params`](#loading-input-params) and [`stuff`](#loading-output-stuff). +- `page` contains an object with the current [`url`](https://developer.mozilla.org/en-US/docs/Web/API/URL), [`params`](#loading-input-params), [`stuff`](#loading-output-stuff), [`status`](#loading-output-status) and [`error`](#loading-output-error). - `session` is a [writable store](https://svelte.dev/tutorial/writable-stores) whose initial value is whatever was returned from [`getSession`](#hooks-getsession). It can be written to, but this will _not_ cause changes to persist on the server — this is something you must implement yourself. ### $lib