improve(dx): clarify missing STELLAR_SERVER_SECRET error#369
Merged
vic-Gray merged 2 commits intoMay 29, 2026
Conversation
Replace the generic startup error for a missing STELLAR_SERVER_SECRET with an actionable message that names the exact variable, explains what is needed, and tells contributors where to configure it. Before: 'STELLAR_SERVER_SECRET environment variable is required' After: 'Missing required environment variable: STELLAR_SERVER_SECRET. Please define it in your .env file before starting the server.' The server still fails to start when the variable is absent — only the diagnostic message improves. This matches the developer-facing guidance style used across the onboarding docs and makes it faster for contributors to fix local setup issues. Also apply explicit User | null type annotation to auth.service.ts to resolve a pre-existing build error (let user = null without type annotation caused TS2322 under strictNullChecks). Fixes code-flexing#316 Fixes #613
|
@Depo-dev is attempting to deploy a commit to the vic's projects Team on Vercel. A member of the Team first needs to authorize it. |
|
@Depo-dev Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
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.
Summary
The startup error thrown when
STELLAR_SERVER_SECRETis missing was too vague for contributors to act on. It didn't name the variable clearly, didn't explain why it was needed, and gave no hint about where to configure it.Previous Issue
This message forces contributors to search the codebase to understand what
STELLAR_SERVER_SECRETis, where to get a value, and which config file to update — a slow and frustrating onboarding experience.New Developer Guidance Behavior
The new message:
.envfile)The server still fails to start when
STELLAR_SERVER_SECRETis absent — only the diagnostic message improves. Exception type (Error) and throw location (constructor) are unchanged.Validation Performed
STELLAR_SERVER_SECRETunset: new message appears correctlySTELLAR_SERVER_SECRETset: no change in behaviorstellar.strategy.spec.tsupdated to assert the new message textAlso applies the pre-existing build fix: explicit
User | nullannotation on theresetPasswordloop accumulator inauth.service.ts(was causingTS2322understrictNullChecks).npx jest src/auth/strategies/stellar.strategy.spec.ts— 18/18 passingnpm run build— cleanFixes #316
Fixes #613