clarify error when configs fail to load

This commit is contained in:
Hazelnoot 2025-05-30 09:09:15 -04:00
parent 1a414f1cfb
commit 47a81ba235

View file

@ -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) {