Skip to content

Conversation

@nyannyacha
Copy link
Contributor

@nyannyacha nyannyacha commented Nov 21, 2025

What kind of change does this PR introduce?

Bug fix

Description

If edge-runtime is behind a reverse proxy like Cloudflare, sudden socket closures (#641) will appear as 502 (Bad Gateway) on the surface.

Returning a 502 without any warning is confusing to users, so if respondWith throws an exception, we make sure to always expose the cause of the error by using console.error.

@nyannyacha nyannyacha requested a review from laktek November 21, 2025 09:21
@nyannyacha nyannyacha merged commit b232c47 into main Nov 24, 2025
4 of 5 checks passed
@nyannyacha nyannyacha deleted the ny/console-error-respond-with branch November 24, 2025 03:15
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.

3 participants