Skip to content

Tweak format for fatal logs to include more data#279

Merged
zoe-codez merged 1 commit intomainfrom
missing-config-error
Jan 9, 2026
Merged

Tweak format for fatal logs to include more data#279
zoe-codez merged 1 commit intomainfrom
missing-config-error

Conversation

@zoe-codez
Copy link
Copy Markdown
Member

@zoe-codez zoe-codez commented Jan 9, 2026

📬 Changes

Before

BootstrapException: REQUIRED_CONFIGURATION_MISSING
    at <anonymous> (/home/zoe/Repos/DigitalAlchemyTS/core/src/services/configuration.service.mts:91:17)
    at Array.forEach (<anonymous>)
    at <anonymous> (/home/zoe/Repos/DigitalAlchemyTS/core/src/services/configuration.service.mts:84:32)
    at Map.forEach (<anonymous>)
    at validateConfig (/home/zoe/Repos/DigitalAlchemyTS/core/src/services/configuration.service.mts:83:23)
    at Object.initialize (/home/zoe/Repos/DigitalAlchemyTS/core/src/services/configuration.service.mts:174:5)
    at async bootstrap (/home/zoe/Repos/DigitalAlchemyTS/core/src/services/wiring.service.mts:512:23)
    at async Object.bootstrap (/home/zoe/Repos/DigitalAlchemyTS/core/src/services/wiring.service.mts:287:19)
    at async ServiceRunner (/home/zoe/Repos/DigitalAlchemyTS/core/src/helpers/service-runner.mts:35:3)
    at async <anonymous> (/home/zoe/Repos/DigitalAlchemyTS/core/testing/pipelines/config-error.mts:3:1)

After

BootstrapException - REQUIRED_CONFIGURATION_MISSING: Configuration property dynamic.NOT_PROVIDED is not defined
    at <anonymous> (/home/zoe/Repos/DigitalAlchemyTS/core/src/services/configuration.service.mts:91:17)
    at Array.forEach (<anonymous>)
    at <anonymous> (/home/zoe/Repos/DigitalAlchemyTS/core/src/services/configuration.service.mts:84:32)
    at Map.forEach (<anonymous>)
    at validateConfig (/home/zoe/Repos/DigitalAlchemyTS/core/src/services/configuration.service.mts:83:23)
    at Object.initialize (/home/zoe/Repos/DigitalAlchemyTS/core/src/services/configuration.service.mts:174:5)
    at async bootstrap (/home/zoe/Repos/DigitalAlchemyTS/core/src/services/wiring.service.mts:512:23)
    at async Object.bootstrap (/home/zoe/Repos/DigitalAlchemyTS/core/src/services/wiring.service.mts:287:19)
    at async ServiceRunner (/home/zoe/Repos/DigitalAlchemyTS/core/src/helpers/service-runner.mts:35:3)
    at async <anonymous> (/home/zoe/Repos/DigitalAlchemyTS/core/testing/pipelines/config-error.mts:3:1)

🗒️ Checklist

  • Read the contribution guide and accept the
    code of conduct
  • Readme and docs (updated or not needed)
  • Tests (added, updated or not needed)

@codecov
Copy link
Copy Markdown

codecov Bot commented Jan 9, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 97.46%. Comparing base (f3aa832) to head (b08c5a0).
⚠️ Report is 5 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #279   +/-   ##
=======================================
  Coverage   97.45%   97.46%           
=======================================
  Files          24       24           
  Lines        1219     1221    +2     
  Branches      235      247   +12     
=======================================
+ Hits         1188     1190    +2     
  Misses         30       30           
  Partials        1        1           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR corrects the assignment of message and cause properties in the BootstrapException class and enhances the fatal log formatting to display more detailed error information including the error cause and properly formatted stack traces.

  • Fixed the swapped message and cause assignments in BootstrapException constructor
  • Enhanced fatalLog function to format errors with ErrorName - cause: message pattern and improved stack trace presentation
  • Updated test assertions to check error.cause instead of error.message to match the corrected behavior

Reviewed changes

Copilot reviewed 4 out of 5 changed files in this pull request and generated no comments.

Show a summary per file
File Description
src/helpers/errors.mts Corrected BootstrapException to properly assign message to this.message and cause to this.cause
src/helpers/logger.mts Enhanced fatalLog formatting to include error cause and improved stack trace presentation
testing/wiring.spec.mts Updated test assertions to check error.cause for error codes instead of error.message
package.json Updated dependency versions for various dev and runtime dependencies
yarn.lock Lockfile updates corresponding to package.json dependency version changes

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@zoe-codez zoe-codez merged commit d17a892 into main Jan 9, 2026
17 checks passed
@zoe-codez zoe-codez deleted the missing-config-error branch January 9, 2026 03:33
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