Skip to content

Better logging and hard failure on config errors#1246

Draft
greenscientist wants to merge 1 commit intochairemobilite:mainfrom
greenscientist:bettererrorhandlingforconfig
Draft

Better logging and hard failure on config errors#1246
greenscientist wants to merge 1 commit intochairemobilite:mainfrom
greenscientist:bettererrorhandlingforconfig

Conversation

@greenscientist
Copy link
Collaborator

No description provided.

@greenscientist greenscientist marked this pull request as draft February 14, 2025 21:30
setProjectConfiguration(configFromFile);
} catch {
console.error(`Error loading server configuration in file ${configFileNormalized}`);
} catch (error: unknown) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add a comment to explain why we have such complex error handling here and not elsewhere.

if (process.env.NODE_ENV === 'production') {
// In production, you might want to use a default configuration
// or terminate the process
process.exit(1);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe add a console log before the process exit?

@greenscientist greenscientist deleted the bettererrorhandlingforconfig branch November 18, 2025 18:36
@greenscientist greenscientist restored the bettererrorhandlingforconfig branch November 18, 2025 18:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants