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

http: dies on platform if no credential #733

Open
josephjclark opened this issue Aug 23, 2024 · 0 comments
Open

http: dies on platform if no credential #733

josephjclark opened this issue Aug 23, 2024 · 0 comments
Assignees

Comments

@josephjclark
Copy link
Collaborator

The http adaptor does this:

export function addBasicAuth(configuration = {}, headers) {
  const { username, password } = configuration;
  if (username && password) {
    Object.assign(headers, makeBasicAuthHeader(username, password));
  }
}

(probably other adaptors too)

This blows up on v1 if there's no credential, because v1 passesnull as the credential. And null is a value, it won't trigger the default.

While we're still supporting v1, we need to be careful about defaulting the configuration object across our adaptors.

we should really fix this in http because latest will be forever broken on v1, which isn't so good

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: New Issues
Development

No branches or pull requests

3 participants