mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-16 02:27:21 +02:00
fix(content-docs): give context about sidebar loading failure (#6887)
This commit is contained in:
parent
e842b40a54
commit
ff0d981853
1 changed files with 19 additions and 12 deletions
|
@ -98,6 +98,7 @@ export async function loadSidebars(
|
|||
sidebarFilePath: string | false | undefined,
|
||||
options: SidebarProcessorParams,
|
||||
): Promise<Sidebars> {
|
||||
try {
|
||||
const sidebarsConfig = await loadSidebarsFileUnsafe(sidebarFilePath);
|
||||
const normalizedSidebars = normalizeSidebars(sidebarsConfig);
|
||||
validateSidebars(normalizedSidebars);
|
||||
|
@ -110,4 +111,10 @@ export async function loadSidebars(
|
|||
options,
|
||||
);
|
||||
return postProcessSidebars(processedSidebars, options);
|
||||
} catch (err) {
|
||||
logger.error`Sidebars file at path=${
|
||||
sidebarFilePath as string
|
||||
} failed to be loaded.`;
|
||||
throw err;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue