mirror of
https://github.com/facebook/docusaurus.git
synced 2025-07-21 10:37:51 +02:00
refactor: unify error handling behavior (#6755)
* refactor: unify error handling behavior * revert * normalize paths * test... * change * does this work... * fix... * maybe fix * maybe fix * fix * fix...
This commit is contained in:
parent
dcbf9f644e
commit
f903422617
58 changed files with 1123 additions and 299 deletions
|
@ -27,12 +27,12 @@ export async function getFileLastUpdate(
|
|||
includeAuthor: true,
|
||||
});
|
||||
return {timestamp: result.timestamp, author: result.author};
|
||||
} catch (e) {
|
||||
if (e instanceof GitNotFoundError && !showedGitRequirementError) {
|
||||
} catch (err) {
|
||||
if (err instanceof GitNotFoundError && !showedGitRequirementError) {
|
||||
logger.warn('Sorry, the docs plugin last update options require Git.');
|
||||
showedGitRequirementError = true;
|
||||
} else {
|
||||
logger.error(e);
|
||||
logger.error(err);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue