Skip to content

fix: handle empty string for optional URL env vars#22

Merged
86667 merged 2 commits intoip_verificationfrom
fix/empty-url-env-var
Apr 8, 2026
Merged

fix: handle empty string for optional URL env vars#22
86667 merged 2 commits intoip_verificationfrom
fix/empty-url-env-var

Conversation

@ovitrif
Copy link
Copy Markdown

@ovitrif ovitrif commented Apr 7, 2026

Stacked on:

Summary

  • When HG_PHOENIXD_API_URL is unset, docker-compose passes an empty string (${HG_PHOENIXD_API_URL:-}), which envy tries to parse as a URL, crashing the container with relative URL without a base: ""
  • Adds a custom deserializer for Option<Url> that treats empty strings as None

Test plan

  • Run docker compose up --build without setting HG_PHOENIXD_API_URL — container should start without errors
  • Run curl -X POST http://0.0.0.0:8080/ip_verification — should return a signup code

🤖 Generated with Claude Code

When HG_PHOENIXD_API_URL is unset, docker-compose passes an empty string
which envy tries to parse as a URL, causing "relative URL without a base"
error on startup. Add a custom deserializer that treats empty strings as None.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@ovitrif ovitrif requested a review from 86667 April 7, 2026 18:07
@86667 86667 merged commit e3c3b04 into ip_verification Apr 8, 2026
2 checks passed
@ovitrif ovitrif deleted the fix/empty-url-env-var branch April 9, 2026 09:53
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