fix: use self-hosted dashboard URL in auth config error message#415
fix: use self-hosted dashboard URL in auth config error message#415majiayu000 wants to merge 1 commit intoget-convex:mainfrom
Conversation
When CONVEX_SELF_HOSTED_URL is set and deploymentName is null, construct the dashboard link from the self-hosted backend hostname instead of showing a generic message without a link. Fixes get-convex#56 Signed-off-by: majiayu000 <1835304752@qq.com>
|
Do you prefer the dashboard over |
|
Thanks for the feedback @ianmacartney! You're right on both points — the hard-coded port 6791 would only be valid for localhost setups and isn't reliably exposed otherwise. I've updated the fix to instead include the variable name directly in the |
Fixes #56
Summary
When
handlePushConfigError()encounters anAuthConfigMissingEnvironmentVariableerror for self-hosted deployments, it falls through to a generic message without a dashboard link. This is becausedeploymentNameisnullfor self-hosted setups (nodeploymentFields).This adds an
else ifbranch that detects self-hosted mode via theCONVEX_SELF_HOSTED_URLenv var and constructs the dashboard URL usinghostname:6791(the default self-hosted dashboard port fromdocker-compose.yml) with the path/settings/environment-variables?var=VAR_NAME.Test plan
config.test.tstests pass (14/14)CONVEX_SELF_HOSTED_URL=http://localhost:3210and trigger theAuthConfigMissingEnvironmentVariableerror path — output showshttp://localhost:6791/settings/environment-variables?var=VAR_NAMEinstead ofdashboard.convex.dev