mirror of
https://github.com/withastro/astro.git
synced 2025-01-22 10:31:53 -05:00
fix(errors): fix error messages rendering incorrectly (#12942)
* fix(errors): fix error messages rendering incorrectly * fix(errors): fix error messages rendering incorrectly * add `@message` for jsdoc * Create tame-hats-kiss.md --------- Co-authored-by: Florian Lefebvre <contact@florian-lefebvre.dev>
This commit is contained in:
parent
2f9ba982fe
commit
f00c2ddc31
2 changed files with 9 additions and 2 deletions
5
.changeset/tame-hats-kiss.md
Normal file
5
.changeset/tame-hats-kiss.md
Normal file
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
"astro": patch
|
||||
---
|
||||
|
||||
Improves the session error messages
|
|
@ -870,6 +870,7 @@ export const AstroResponseHeadersReassigned = {
|
|||
|
||||
/**
|
||||
* @docs
|
||||
* @message Error when initializing session storage with driver `DRIVER`. `ERROR`
|
||||
* @see
|
||||
* - [experimental.session](https://docs.astro.build/en/reference/experimental-flags/sessions/)
|
||||
* @description
|
||||
|
@ -879,12 +880,13 @@ export const SessionStorageInitError = {
|
|||
name: 'SessionStorageInitError',
|
||||
title: 'Session storage could not be initialized.',
|
||||
message: (error: string, driver?: string) =>
|
||||
`Error when initializing session storage${driver ? ` with driver ${driver}` : ''}. ${error ?? ''}`,
|
||||
`Error when initializing session storage${driver ? ` with driver \`${driver}\`` : ''}. \`${error ?? ''}\``,
|
||||
hint: 'For more information, see https://docs.astro.build/en/reference/experimental-flags/sessions/',
|
||||
} satisfies ErrorData;
|
||||
|
||||
/**
|
||||
* @docs
|
||||
* @message Error when saving session data with driver `DRIVER`. `ERROR`
|
||||
* @see
|
||||
* - [experimental.session](https://docs.astro.build/en/reference/experimental-flags/sessions/)
|
||||
* @description
|
||||
|
@ -894,7 +896,7 @@ export const SessionStorageSaveError = {
|
|||
name: 'SessionStorageSaveError',
|
||||
title: 'Session data could not be saved.',
|
||||
message: (error: string, driver?: string) =>
|
||||
`Error when saving session data${driver ? ` with driver ${driver}` : ''}. ${error ?? ''}`,
|
||||
`Error when saving session data${driver ? ` with driver \`${driver}\`` : ''}. \`${error ?? ''}\``,
|
||||
hint: 'For more information, see https://docs.astro.build/en/reference/experimental-flags/sessions/',
|
||||
} satisfies ErrorData;
|
||||
|
||||
|
|
Loading…
Reference in a new issue