Skip to content

fix(config): guard process.env access in resolveCredential (#440) - #564

Merged
David-patrick-chuks-02 merged 3 commits into
Lilly-Protocol:mainfrom
Zhiyilang074811:fix/issue-440-browser-env
Sep 6, 2026
Merged

fix(config): guard process.env access in resolveCredential (#440)#564
David-patrick-chuks-02 merged 3 commits into
Lilly-Protocol:mainfrom
Zhiyilang074811:fix/issue-440-browser-env

Conversation

@Zhiyilang074811

Copy link
Copy Markdown
Contributor

Closes #440. Guards process.env access in resolveCredential so SDK construction works in browsers. Added regression test.

Zhiyilang074811 and others added 2 commits September 5, 2026 20:29
…col#487 Lilly-Protocol#485 — client ID validation, non-2xx JSON errors, shared defaults, baseUrl fallback

- agent/wallet/payment clients: reject empty/whitespace IDs via validateNonEmptyString (Closes Lilly-Protocol#443, bounty Lilly-Protocol#489 )
- fetch-http-client: read body once as text then JSON.parse; throw LilyApiError (not ValidationError) on non-2xx JSON parse failures (Closes Lilly-Protocol#445, bounty Lilly-Protocol#488 )
- src/config/defaults.ts: new file with DEFAULT_TIMEOUT_MS, DEFAULT_RETRY_POLICY, DEFAULT_RETRYABLE_STATUS_CODES (bounty Lilly-Protocol#487 )
- resolve-config.ts: import from defaults; support LILY_BASE_URL env fallback alongside LILY_API_URL (Closes Lilly-Protocol#444, bounty Lilly-Protocol#485 )
- config.ts: export shared defaults
- Add tests: client-id-validation, shared-defaults, updated fetch-non-json tests
@David-patrick-chuks-02
David-patrick-chuks-02 merged commit 42cdd57 into Lilly-Protocol:main Sep 6, 2026
3 of 8 checks passed
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.

[Bounty: $65] Guard process.env access in resolveCredential so SDK construction works in browsers

3 participants