From 93cb808f3a2f578b8676428f9b030bbef38d4c57 Mon Sep 17 00:00:00 2001 From: shadcn Date: Sun, 21 Apr 2024 00:50:59 +0400 Subject: [PATCH] chore: debug edit --- apps/www/actions/edit-in-v0.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/apps/www/actions/edit-in-v0.ts b/apps/www/actions/edit-in-v0.ts index 82d19ced0..47060232b 100644 --- a/apps/www/actions/edit-in-v0.ts +++ b/apps/www/actions/edit-in-v0.ts @@ -34,6 +34,8 @@ export async function editInV0({ }) if (!response.ok) { + console.log(response.status, response.statusText) + if (response.status === 403) { throw new Error("Unauthorized") } @@ -43,6 +45,8 @@ export async function editInV0({ return await response.json() } catch (error) { + console.log(error) + if (error instanceof Error) { return { error: error.message } }