Compare commits

...

1 Commits

Author SHA1 Message Date
shadcn
93cb808f3a chore: debug edit 2024-04-21 00:50:59 +04:00

View File

@@ -34,6 +34,8 @@ export async function editInV0({
}) })
if (!response.ok) { if (!response.ok) {
console.log(response.status, response.statusText)
if (response.status === 403) { if (response.status === 403) {
throw new Error("Unauthorized") throw new Error("Unauthorized")
} }
@@ -43,6 +45,8 @@ export async function editInV0({
return await response.json() return await response.json()
} catch (error) { } catch (error) {
console.log(error)
if (error instanceof Error) { if (error instanceof Error) {
return { error: error.message } return { error: error.message }
} }