From 18488bb3be37b02446e8ad58fcfb31c1b6bedd1a Mon Sep 17 00:00:00 2001 From: Ashleigh Carr Date: Thu, 21 Nov 2024 15:58:10 +0000 Subject: [PATCH] feat: Add more information to errors if we think cookies are missing --- src/client/components/GatewayErrorSummary.tsx | 21 +++++++++++++++---- src/server/lib/renderer.tsx | 5 ++++- src/shared/model/Errors.ts | 2 +- 3 files changed, 22 insertions(+), 6 deletions(-) diff --git a/src/client/components/GatewayErrorSummary.tsx b/src/client/components/GatewayErrorSummary.tsx index f82497a94e..d912f344ef 100644 --- a/src/client/components/GatewayErrorSummary.tsx +++ b/src/client/components/GatewayErrorSummary.tsx @@ -18,10 +18,22 @@ interface GateWayErrorSummaryProps export const GatewayErrorSummary = (props: GateWayErrorSummaryProps) => { const structuredError = asStructuredError(props.gatewayError); - const fullContext = - props.shortRequestId && structuredError?.severity !== 'BAU' + const fullContext = [ + props.context, + ...(structuredError?.severity === 'CSRF' + ? [ +

+ If the problem persists, please check if you have cookies enabled. + You can find details on how to enable cookies in our{' '} + + Cookies FAQ + + . +

, + ] + : []), + ...(props.shortRequestId && structuredError?.severity !== 'BAU' ? [ - props.context,

{ Request ID: {props.shortRequestId}

, ] - : props.context; + : []), + ]; return (