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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Throw an error when malformed host is passed in CreateHttpClientParams to createHttpClient #439

Open
catchergeese opened this issue Feb 20, 2024 · 0 comments

Comments

@catchergeese
Copy link

catchergeese commented Feb 20, 2024

Hi 馃憢

I use JavaScript Contentful SDK. It allows to specify host param. I use it to create either a delivery or preview Contentful client.

Recently, I accidentally passed https://preview.contentful.com instead of preview.contentful.com when moving from custom HTTP client to JS CTF SDK. While in the hindsight it seems like an obvious mistake of mine, it took some time to discover.

Do you think it would make sense to throw an Error when host param is passed and it doesn't match the expected format here? Currently, it fails silently.

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

No branches or pull requests

1 participant