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(log): Handle case when error code is missing #303

Merged
merged 2 commits into from Nov 25, 2018
Merged

fix(log): Handle case when error code is missing #303

merged 2 commits into from Nov 25, 2018

Conversation

sorin-davidoi
Copy link
Contributor

@sorin-davidoi sorin-davidoi commented Oct 19, 2018

To reproduce supply a custom certificate with altnames (e.g. localhost:5000) that does not include localhost:<port> and start server on localhost:<port> (e.g. localhost:3000).

Before

[HPM] Error occurred while trying to proxy request <redacted> from <redacted> to <redacted> (undefined) (https://nodejs.org/api/errors.html#errors_common_system_errors)

After

[HPM] Error occurred while trying to proxy request <redacted> from <redacted> to <redacted> (Error: Hostname/IP doesn't match certificate's altnames: "Host: <redacted>. is not in the cert's altnames: DNS:<redacted>, DNS:<redacted>") (https://nodejs.org/api/errors.html#errors_common_system_errors)

# Before
```
HPM] Error occurred while trying to proxy request <redacted> from <redacted> to <redacted> (undefined) (https://nodejs.org/api/errors.html#errors_common_system_errors)
```

# After
```
[HPM] Error occurred while trying to proxy request <redacted> from <redacted> to <redacted> (Error: Hostname/IP doesn't match certificate's altnames: "Host: <redacted>. is not in the cert's altnames: DNS:<redacted>, DNS:<redacted>") (https://nodejs.org/api/errors.html#errors_common_system_errors)
```
@coveralls
Copy link

coveralls commented Oct 19, 2018

Coverage Status

Coverage remained the same at 97.067% when pulling 4a4e112 on sorin-davidoi:patch-1 into 029c99d on chimurai:master.

@chimurai
Copy link
Owner

chimurai commented Nov 12, 2018

Thanks @sorin-davidoi .

Can you update the PR description on how to reproduce this issue?

@brettdh
Copy link

brettdh commented Nov 20, 2018

See also #263 for a variant (err.reason). I have no strong opinion about which is better, but it would be great to get one of these merged.

I haven't tested a minimal example, but I suspect that another way to reproduce this would be to copy the basic https recipe and remove "changeOrigin": true (adding it to my config resolved the similar altnames error I was seeing).

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.

None yet

4 participants