mirror of
https://github.com/supabase/supabase.git
synced 2026-10-05 09:25:06 +03:00
chore(docs-gpt): better logs for application errors
This commit is contained in:
1 parent
5cac2faee2
commit
8bc6a6b7b5
1 file changed
+6
-3
@@ -168,11 +168,14 @@ serve(async (req) => {
|
||||
headers: { ...corsHeaders, 'Content-Type': 'application/json' },
|
||||
}
|
||||
)
|
||||
} else if (err instanceof ApplicationError) {
|
||||
// Print out application errors with their additional data
|
||||
console.error(`${err.message}: ${JSON.stringify(err.data)}`)
|
||||
} else {
|
||||
// Print out unexpected errors as is to help with debugging
|
||||
console.error(err)
|
||||
}
|
||||
|
||||
// Print out unexpected errors to help with debugging
|
||||
console.error(err)
|
||||
|
||||
// TODO: include more response info in debug environments
|
||||
return new Response(
|
||||
JSON.stringify({
|
||||
|
||||
Reference in new issue
Block a user