Skip to content

πŸ“¨ The ultimate agentic social media scheduling tool πŸ€–

fix(frontend): tolerate a non-JSON 402 body in the payment dialog

Gilad Resisi971aa369f3c4
diff --git a/apps/frontend/src/components/layout/layout.context.tsx b/apps/frontend/src/components/layout/layout.context.tsx
index 876daa898..8aea646eb 100644
--- a/apps/frontend/src/components/layout/layout.context.tsx
+++ b/apps/frontend/src/components/layout/layout.context.tsx
@@ -107,7 +107,10 @@ function LayoutContextInner(params: { children: ReactNode }) {
if (
await deleteDialog(
(
- await response.clone().json()
+ await response
+ .clone()
+ .json()
+ .catch(() => ({}))
).message,
'Move to billing',
'Payment Required'