From ea9b7f0274bcf9f5900018f1e8cb14f5c566cf0f Mon Sep 17 00:00:00 2001 From: Sam Becker Date: Fri, 1 Mar 2024 17:09:22 -0600 Subject: [PATCH] Update PPR error types --- src/utility/ppr.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/utility/ppr.ts b/src/utility/ppr.ts index e38c3e4a..da969ee8 100644 --- a/src/utility/ppr.ts +++ b/src/utility/ppr.ts @@ -6,10 +6,10 @@ export const screenForPPR = ( // PPR errors, if caught, must be re-thrown in order to // postpone rendering - if (error.sourceError?.message.includes('ppr-caught-error')) { + if (error.sourceError?.message?.includes('ppr-caught-error')) { console.log( sourceToLog ? `${sourceToLog}: PPR error caught` : 'PPR error caught', - error.sourceError.message, + error.sourceError?.message, ); throw error.sourceError.message; } else if (error.message?.includes('ppr-caught-error')) {