mirror of
https://github.com/unraid/api.git
synced 2026-01-07 17:19:52 -06:00
feat: log config recreation reason
This commit is contained in:
@@ -105,11 +105,10 @@ void am(
|
||||
},
|
||||
async (error: NodeJS.ErrnoException) => {
|
||||
logger.error('API-GLOBAL-ERROR %s %s', error.message, error.stack);
|
||||
shutdownApiEvent();
|
||||
if (server) {
|
||||
await server?.close?.();
|
||||
}
|
||||
|
||||
shutdownApiEvent();
|
||||
// Kill application
|
||||
process.exitCode = 1;
|
||||
}
|
||||
|
||||
@@ -197,7 +197,7 @@ export const loadConfigFile = createAsyncThunk<
|
||||
}
|
||||
return newConfigFile;
|
||||
} catch (error: unknown) {
|
||||
logger.warn('Config file is corrupted, recreating config', error);
|
||||
logger.warn('Config file is corrupted with error: %o - recreating config', error);
|
||||
const config = getWriteableConfig(initialState, 'flash');
|
||||
const newConfig = generateApiKeysIfNotExistent(config);
|
||||
newConfig.remote.wanaccess = 'no';
|
||||
|
||||
Reference in New Issue
Block a user