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

fix: handle case no content type #3931

Merged
merged 1 commit into from
Dec 10, 2024

Conversation

Gigioliva
Copy link
Contributor

@Gigioliva Gigioliva commented Dec 7, 2024

Handle case server doesn't include content-type

Rationale

If the server does not return the value for content-type, the interceptor raises an exception since it tries to use indexOf of undefined.

Changes

Add a fallback in case #contentType is undefined.

Bug Fixes

Fix this issue

Status

@mcollina
Copy link
Member

mcollina commented Dec 8, 2024

Can you please rebase/update this branch?

@Gigioliva Gigioliva force-pushed the fix/type-not-defined branch from 9f80c0d to 1e935a0 Compare December 8, 2024 09:49
@Gigioliva
Copy link
Contributor Author

Can you please rebase/update this branch?

Done... but still there are some flaky tests

@mcollina
Copy link
Member

mcollina commented Dec 8, 2024

This now conflicts, could you update? Unfortunately that's a known flake.

1 similar comment
@mcollina
Copy link
Member

mcollina commented Dec 8, 2024

This now conflicts, could you update? Unfortunately that's a known flake.

@Gigioliva Gigioliva force-pushed the fix/type-not-defined branch from 1e935a0 to df7635e Compare December 8, 2024 12:02
@Gigioliva
Copy link
Contributor Author

All good? or something is missing?

Copy link
Member

@mcollina mcollina left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@mcollina mcollina merged commit dd7473c into nodejs:main Dec 10, 2024
31 checks passed
This was referenced Dec 16, 2024
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.

interceptors.responseError doesn't work with MockAgent
3 participants