mirror of
https://codeberg.org/yeentown/barkey.git
synced 2025-07-07 20:44:34 +00:00
clarify error when configs fail to load
This commit is contained in:
parent
1a414f1cfb
commit
47a81ba235
1 changed files with 4 additions and 0 deletions
|
@ -499,6 +499,10 @@ export function loadConfig(): Config {
|
||||||
}
|
}
|
||||||
|
|
||||||
function tryCreateUrl(url: string) {
|
function tryCreateUrl(url: string) {
|
||||||
|
if (!url) {
|
||||||
|
throw new Error('Failed to load: no "url" property found in config. Please check the value of "MISSKEY_CONFIG_DIR" and "MISSKEY_CONFIG_YML", and verify that all configuration files are correct.');
|
||||||
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
return new URL(url);
|
return new URL(url);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue