Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add skipConvexDeploymentUrlCheck Option to setupConvex Function #3

Closed
vynxc opened this issue Jun 11, 2024 · 0 comments · Fixed by #4
Closed

Add skipConvexDeploymentUrlCheck Option to setupConvex Function #3

vynxc opened this issue Jun 11, 2024 · 0 comments · Fixed by #4

Comments

@vynxc
Copy link

vynxc commented Jun 11, 2024

Currently, the setupConvex function throws an error when provided a URL that does not end with ".convex.cloud":

export const setupConvex = (url: string) => {
	if (!url || typeof url !== 'string') {
		throw new Error('Expected string url property for setupConvex');
	}

	const client = new ConvexClient(url, { disabled: !BROWSER });
	setConvexClientContext(client);
	$effect(() => () => client.close());
};

Error Message
The error encountered is:

Invalid deployment address: Must end with ".convex.cloud". Found "domain.com". If you believe this URL is correct, use the skipConvexDeploymentUrlCheck option to bypass this.

Proposed Change
To address this issue, I propose updating the setupConvex function to include skipConvexDeploymentUrlCheck or an optional parameter for ConvexClientOptions

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 a pull request may close this issue.

1 participant