Fix error handling in server.js
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
@@ -22,7 +22,7 @@ try {
|
|||||||
setup = JSON.parse(fs.readFileSync(path.join(__dirname, 'data', 'setup.json'), 'utf8'));
|
setup = JSON.parse(fs.readFileSync(path.join(__dirname, 'data', 'setup.json'), 'utf8'));
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
console.error('Error reading setup.json:', err);
|
console.error('Error reading setup.json:', err);
|
||||||
process.exit(1);
|
setup = {};
|
||||||
}
|
}
|
||||||
|
|
||||||
if (setup.discord !== undefined) {
|
if (setup.discord !== undefined) {
|
||||||
|
|||||||
Reference in New Issue
Block a user