fix: migrate errorLogger env var read to validated config to prevent … - #669
Open
onyemaechiezekiel9 wants to merge 1 commit into
Open
fix: migrate errorLogger env var read to validated config to prevent …#669onyemaechiezekiel9 wants to merge 1 commit into
onyemaechiezekiel9 wants to merge 1 commit into
Conversation
Contributor
|
Thanks for picking this up, @onyemaechiezekiel9 — this is assigned to you via the GrantFox bot for issue #586. Before this can be merged, all required CI checks need to pass. Currently failing:
Please push a fix and make sure the full CI suite is green — I'll take another look once it is. Thanks for the contribution! |
Contributor
|
👋 Thanks for the submission! This PR currently has one or more failing CI checks. Per the GrantFox review process, PRs need all checks green before they can be merged — please take a look at the Checks tab (or run I'll take another look once everything is passing. Thanks for your patience! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fix Issue #586: Migrate errorLogger.ts to validated @/config/env
Summary
Migrated
errorLogger.tsfrom directprocess.envreads to the validated@/config/envconfiguration system, ensuring environment validation fails fast at startup rather than silently degrading at runtime.Changes
src/utils/errorLogger.ts
process.env.NODE_ENVwithappConfig.nodeEnvfrom validated configprocess.env.SENTRY_DSNaccess withappConfig.sentryDsninitializeErrorLogger()that runs on module load, logging a clear warning ifNEXT_PUBLIC_SENTRY_DSNis not configuredsrc/utils/tests/errorLogger.test.ts (new)
Why This Matters
Testing
Related
errorLogger.ts's directprocess.envread — confirm error-logging/reporting doesn't silently no-op in an environment where the expected config path was never validated #586