Skip to content

Commit 867501f

Browse files
committed
edit
1 parent ce98a53 commit 867501f

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

custom-redirect.js

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,8 @@ export async function c_redirect(request, response, thrownError = null, isMainte
9292
// it's the default message so no need to change anything
9393
}
9494

95-
console.log("thrownError:", thrownError?.message + thrownError?.name + thrownError?.cause + thrownError?.stack);
95+
console.log("thrownError:", thrownError);
96+
console.log("response.status:", response.status);
9697

9798
// Handle zero trust errors
9899
if(thrownError && thrownError == 1033) {
@@ -107,10 +108,6 @@ export async function c_redirect(request, response, thrownError = null, isMainte
107108
// Handle server errors (5xx)
108109
if(response && response.status >= 500) {
109110
getErrorDetailsFromCfCode(response.status, env);
110-
if (HELPER.isCloudflareError(response)) {
111-
const cfCode = await HELPER.getCloudflareErrorCode(response);
112-
getErrorDetailsFromCfCode(cfCode, env);
113-
}
114111
return makeResponse(REDIRECT.generateErrorPage());
115112
}
116113

0 commit comments

Comments
 (0)