miniflare
Advanced tools
Comparing version 3.20231030.3 to 3.20231030.4
@@ -795,11 +795,9 @@ // ../../node_modules/.pnpm/kleur@4.1.5/node_modules/kleur/colors.mjs | ||
function maybePrettifyError(request, response, env) { | ||
if (response.status !== 500 || response.headers.get(CoreHeaders.ERROR_STACK) === null) | ||
return response; | ||
let accept = request.headers.get("Accept"), userAgent = request.headers.get("User-Agent"), headers = new Headers(); | ||
return accept !== null && headers.set("Accept", accept), userAgent !== null && headers.set("User-Agent", userAgent), env[CoreBindings.SERVICE_LOOPBACK].fetch( | ||
return response.status !== 500 || response.headers.get(CoreHeaders.ERROR_STACK) === null ? response : env[CoreBindings.SERVICE_LOOPBACK].fetch( | ||
"http://localhost/core/error", | ||
{ | ||
method: "POST", | ||
headers, | ||
body: response.body | ||
headers: request.headers, | ||
body: response.body, | ||
cf: { prettyErrorOriginalUrl: request.url } | ||
} | ||
@@ -806,0 +804,0 @@ ); |
{ | ||
"name": "miniflare", | ||
"version": "3.20231030.3", | ||
"version": "3.20231030.4", | ||
"description": "Fun, full-featured, fully-local simulator for Cloudflare Workers", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
1494054
29787