Skip to content

Conversation

@irvinebroque
Copy link
Collaborator

WIP, see if this improves error output of: cloudflare/workers-sdk#9356

then after can figure out actual right way to do this, but want to understand if this is the underlying issue

When fetch() fails due to TLS certificate errors (e.g., self-signed certs, untrusted CAs), workerd now returns actionable error messages instead of opaque "internal error; reference = ..." responses.

The improved errors:

  • Explain that the TLS certificate could not be verified
  • Suggest setting NODE_EXTRA_CA_CERTS for local development scenarios
  • Handle specific cases: untrusted certs, missing certs, connection failures

This helps developers diagnose and fix certificate issues when making HTTPS requests during local development, particularly when connecting to servers with self-signed certificates.

When fetch() fails due to TLS certificate errors (e.g., self-signed certs,
untrusted CAs), workerd now returns actionable error messages instead of
opaque "internal error; reference = ..." responses.

The improved errors:
- Explain that the TLS certificate could not be verified
- Suggest setting NODE_EXTRA_CA_CERTS for local development scenarios
- Handle specific cases: untrusted certs, missing certs, connection failures

This helps developers diagnose and fix certificate issues when making HTTPS
requests during local development, particularly when connecting to servers
with self-signed certificates.

Fixes: cloudflare/workers-sdk#9356
@codspeed-hq
Copy link

codspeed-hq bot commented Jan 5, 2026

CodSpeed Performance Report

Merging #5831 will improve performance by 10.61%

Comparing irvinebroque:workers-sdk-9356 (4b4d9be) with main (13628a9)

Summary

⚡ 1 improvement
✅ 139 untouched
⏩ 38 skipped1

Benchmarks breakdown

Benchmark BASE HEAD Efficiency
Encode_ASCII_1024[TextEncoder][0/0/1024] 4 ms 3.6 ms +10.61%

Footnotes

  1. 38 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

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.

1 participant