Logging (#30)
* Added loggin for the onboarding flow. * Logging for potential errors * feat: enhance onboarding error logging with server-side capture * Update app/(onboarding)/onboarding/page.tsx Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com> --------- Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
This commit is contained in:
co-authored by
greptile-apps[bot]
parent
2b1331decb
commit
c7672e538a
@@ -0,0 +1,18 @@
|
||||
import { createClient } from '@/lib/supabase/server'
|
||||
import { SentryIdentify } from '@/components/SentryIdentify'
|
||||
|
||||
export default async function OnboardingLayout({
|
||||
children,
|
||||
}: {
|
||||
children: React.ReactNode
|
||||
}) {
|
||||
const supabase = await createClient()
|
||||
const { data: { user } } = await supabase.auth.getUser()
|
||||
|
||||
return (
|
||||
<>
|
||||
{children}
|
||||
{user && <SentryIdentify userId={user.id} email={user.email} />}
|
||||
</>
|
||||
)
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,14 @@
|
||||
import { NextResponse } from 'next/server'
|
||||
|
||||
export async function POST(request: Request) {
|
||||
try {
|
||||
const { message, extra } = await request.json()
|
||||
|
||||
// This console.error runs server-side → visible in Vercel Logs
|
||||
console.error('[onboarding]', message, extra ? JSON.stringify(extra) : '')
|
||||
|
||||
return NextResponse.json({ ok: true })
|
||||
} catch {
|
||||
return NextResponse.json({ ok: false }, { status: 400 })
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user