/home/ccuser/the-50-dollar-app/src/components/payment/PaymentForm.tsx-52- } /home/ccuser/the-50-dollar-app/src/components/payment/PaymentForm.tsx-53- } catch (error) { /home/ccuser/the-50-dollar-app/src/components/payment/PaymentForm.tsx:54: console.error('Payment error:', error); /home/ccuser/the-50-dollar-app/src/components/payment/PaymentForm.tsx-55- setErrorMessage('An unexpected error occurred. Please try again.'); /home/ccuser/the-50-dollar-app/src/components/payment/PaymentForm.tsx-56- } finally { -- /home/ccuser/the-50-dollar-app/src/components/payment/HirePaymentModal.tsx-70- }); /home/ccuser/the-50-dollar-app/src/components/payment/HirePaymentModal.tsx-71- } catch (error) { /home/ccuser/the-50-dollar-app/src/components/payment/HirePaymentModal.tsx:72: console.error('Payment initialization error:', error); /home/ccuser/the-50-dollar-app/src/components/payment/HirePaymentModal.tsx-73- setPaymentState({ /home/ccuser/the-50-dollar-app/src/components/payment/HirePaymentModal.tsx-74- type: 'error', -- /home/ccuser/the-50-dollar-app/src/lib/csrf.ts-76- /home/ccuser/the-50-dollar-app/src/lib/csrf.ts-77- if (!cookieToken) { /home/ccuser/the-50-dollar-app/src/lib/csrf.ts:78: console.error('CSRF validation failed: No token in cookie'); /home/ccuser/the-50-dollar-app/src/lib/csrf.ts-79- return false; /home/ccuser/the-50-dollar-app/src/lib/csrf.ts-80- } -- /home/ccuser/the-50-dollar-app/src/lib/csrf.ts-108- /home/ccuser/the-50-dollar-app/src/lib/csrf.ts-109- if (!requestToken) { /home/ccuser/the-50-dollar-app/src/lib/csrf.ts:110: console.error('CSRF validation failed: No token in request'); /home/ccuser/the-50-dollar-app/src/lib/csrf.ts-111- return false; /home/ccuser/the-50-dollar-app/src/lib/csrf.ts-112- } -- /home/ccuser/the-50-dollar-app/src/lib/csrf.ts-116- /home/ccuser/the-50-dollar-app/src/lib/csrf.ts-117- if (!tokensMatch) { /home/ccuser/the-50-dollar-app/src/lib/csrf.ts:118: console.error('CSRF validation failed: Token mismatch'); /home/ccuser/the-50-dollar-app/src/lib/csrf.ts-119- return false; /home/ccuser/the-50-dollar-app/src/lib/csrf.ts-120- } -- /home/ccuser/the-50-dollar-app/src/lib/api-errors.ts-108- return await handler(request); /home/ccuser/the-50-dollar-app/src/lib/api-errors.ts-109- } catch (error) { /home/ccuser/the-50-dollar-app/src/lib/api-errors.ts:110: console.error("API route error:", error); /home/ccuser/the-50-dollar-app/src/lib/api-errors.ts-111- /home/ccuser/the-50-dollar-app/src/lib/api-errors.ts-112- if (error instanceof APIError) { -- /home/ccuser/the-50-dollar-app/src/lib/error-handling.tsx-20- /home/ccuser/the-50-dollar-app/src/lib/error-handling.tsx-21- const handleSetError = useCallback((newError: Error) => { /home/ccuser/the-50-dollar-app/src/lib/error-handling.tsx:22: console.error("Error caught by boundary:", newError); /home/ccuser/the-50-dollar-app/src/lib/error-handling.tsx-23- setError(newError); /home/ccuser/the-50-dollar-app/src/lib/error-handling.tsx-24- }, []); -- /home/ccuser/the-50-dollar-app/src/lib/error-handling.tsx-62- const error = err instanceof Error ? err : new Error(String(err)); /home/ccuser/the-50-dollar-app/src/lib/error-handling.tsx-63- setError(error); /home/ccuser/the-50-dollar-app/src/lib/error-handling.tsx:64: console.error("Async operation error:", error); /home/ccuser/the-50-dollar-app/src/lib/error-handling.tsx-65- return null; /home/ccuser/the-50-dollar-app/src/lib/error-handling.tsx-66- } finally { -- /home/ccuser/the-50-dollar-app/src/lib/location-utils.ts-33- } /home/ccuser/the-50-dollar-app/src/lib/location-utils.ts-34- /home/ccuser/the-50-dollar-app/src/lib/location-utils.ts:35: console.warn('Unexpected location format:', point); /home/ccuser/the-50-dollar-app/src/lib/location-utils.ts-36- return null; /home/ccuser/the-50-dollar-app/src/lib/location-utils.ts-37-} -- /home/ccuser/the-50-dollar-app/src/lib/csrf-client.ts-34- /home/ccuser/the-50-dollar-app/src/lib/csrf-client.ts-35- if (!response.ok) { /home/ccuser/the-50-dollar-app/src/lib/csrf-client.ts:36: console.error('Failed to fetch CSRF token:', response.status); /home/ccuser/the-50-dollar-app/src/lib/csrf-client.ts-37- return null; /home/ccuser/the-50-dollar-app/src/lib/csrf-client.ts-38- } -- /home/ccuser/the-50-dollar-app/src/lib/csrf-client.ts-41- return data.token || null; /home/ccuser/the-50-dollar-app/src/lib/csrf-client.ts-42- } catch (error) { /home/ccuser/the-50-dollar-app/src/lib/csrf-client.ts:43: console.error('Error fetching CSRF token:', error); /home/ccuser/the-50-dollar-app/src/lib/csrf-client.ts-44- return null; /home/ccuser/the-50-dollar-app/src/lib/csrf-client.ts-45- } -- /home/ccuser/the-50-dollar-app/src/lib/csrf-client.ts-53- /home/ccuser/the-50-dollar-app/src/lib/csrf-client.ts-54- if (!token) { /home/ccuser/the-50-dollar-app/src/lib/csrf-client.ts:55: console.warn('No CSRF token found in cookies'); /home/ccuser/the-50-dollar-app/src/lib/csrf-client.ts-56- return options; /home/ccuser/the-50-dollar-app/src/lib/csrf-client.ts-57- } -- /home/ccuser/the-50-dollar-app/src/lib/csrf-client.ts-83- formData.append('csrf_token', token); /home/ccuser/the-50-dollar-app/src/lib/csrf-client.ts-84- } else { /home/ccuser/the-50-dollar-app/src/lib/csrf-client.ts:85: console.warn('No CSRF token found in cookies'); /home/ccuser/the-50-dollar-app/src/lib/csrf-client.ts-86- } /home/ccuser/the-50-dollar-app/src/lib/csrf-client.ts-87- -- /home/ccuser/the-50-dollar-app/src/lib/stripe/server.ts-52- }; /home/ccuser/the-50-dollar-app/src/lib/stripe/server.ts-53- } catch (error) { /home/ccuser/the-50-dollar-app/src/lib/stripe/server.ts:54: console.error('Error creating PaymentIntent:', error); /home/ccuser/the-50-dollar-app/src/lib/stripe/server.ts-55- throw new Error('Failed to create payment intent'); /home/ccuser/the-50-dollar-app/src/lib/stripe/server.ts-56- } -- /home/ccuser/the-50-dollar-app/src/lib/stripe/server.ts-62- return await stripe.paymentIntents.retrieve(paymentIntentId); /home/ccuser/the-50-dollar-app/src/lib/stripe/server.ts-63- } catch (error) { /home/ccuser/the-50-dollar-app/src/lib/stripe/server.ts:64: console.error('Error retrieving PaymentIntent:', error); /home/ccuser/the-50-dollar-app/src/lib/stripe/server.ts-65- throw new Error('Failed to retrieve payment intent'); /home/ccuser/the-50-dollar-app/src/lib/stripe/server.ts-66- } -- /home/ccuser/the-50-dollar-app/src/lib/stripe/server.ts-81- return stripe.webhooks.constructEvent(payload, signature, webhookSecret); /home/ccuser/the-50-dollar-app/src/lib/stripe/server.ts-82- } catch (error) { /home/ccuser/the-50-dollar-app/src/lib/stripe/server.ts:83: console.error('Webhook signature verification failed:', error); /home/ccuser/the-50-dollar-app/src/lib/stripe/server.ts-84- throw new Error('Invalid webhook signature'); /home/ccuser/the-50-dollar-app/src/lib/stripe/server.ts-85- } -- /home/ccuser/the-50-dollar-app/src/app/global-error.tsx-13- useEffect(() => { /home/ccuser/the-50-dollar-app/src/app/global-error.tsx-14- // Log the error to an error reporting service /home/ccuser/the-50-dollar-app/src/app/global-error.tsx:15: console.error('Global error boundary caught:', error); /home/ccuser/the-50-dollar-app/src/app/global-error.tsx-16- }, [error]); /home/ccuser/the-50-dollar-app/src/app/global-error.tsx-17- -- /home/ccuser/the-50-dollar-app/src/app/error.tsx-13- useEffect(() => { /home/ccuser/the-50-dollar-app/src/app/error.tsx-14- // Log the error to an error reporting service /home/ccuser/the-50-dollar-app/src/app/error.tsx:15: console.error('Root error boundary caught:', error); /home/ccuser/the-50-dollar-app/src/app/error.tsx-16- }, [error]); /home/ccuser/the-50-dollar-app/src/app/error.tsx-17- -- /home/ccuser/the-50-dollar-app/src/app/(authenticated)/contractor/error.tsx-12-}) { /home/ccuser/the-50-dollar-app/src/app/(authenticated)/contractor/error.tsx-13- useEffect(() => { /home/ccuser/the-50-dollar-app/src/app/(authenticated)/contractor/error.tsx:14: console.error('Contractor route error:', error); /home/ccuser/the-50-dollar-app/src/app/(authenticated)/contractor/error.tsx-15- }, [error]); /home/ccuser/the-50-dollar-app/src/app/(authenticated)/contractor/error.tsx-16- -- /home/ccuser/the-50-dollar-app/src/app/(authenticated)/contractor/signup/page.tsx-112- companyData.logoSource = 'none'; /home/ccuser/the-50-dollar-app/src/app/(authenticated)/contractor/signup/page.tsx-113- } catch (error) { /home/ccuser/the-50-dollar-app/src/app/(authenticated)/contractor/signup/page.tsx:114: console.error('Logo fetch failed:', error); /home/ccuser/the-50-dollar-app/src/app/(authenticated)/contractor/signup/page.tsx-115- companyData.logoUrl = null; /home/ccuser/the-50-dollar-app/src/app/(authenticated)/contractor/signup/page.tsx-116- companyData.logoSource = 'none'; -- /home/ccuser/the-50-dollar-app/src/app/(authenticated)/contractor/payment-success/page.tsx-48- } /home/ccuser/the-50-dollar-app/src/app/(authenticated)/contractor/payment-success/page.tsx-49- } catch (error) { /home/ccuser/the-50-dollar-app/src/app/(authenticated)/contractor/payment-success/page.tsx:50: console.error('Error checking payment:', error); /home/ccuser/the-50-dollar-app/src/app/(authenticated)/contractor/payment-success/page.tsx-51- setStatus('success'); // Assume success since Stripe redirected here /home/ccuser/the-50-dollar-app/src/app/(authenticated)/contractor/payment-success/page.tsx-52- setMessage('Payment received! Processing your hire...'); -- /home/ccuser/the-50-dollar-app/src/app/(authenticated)/messages/[conversationId]/page.tsx-104- } /home/ccuser/the-50-dollar-app/src/app/(authenticated)/messages/[conversationId]/page.tsx-105- } catch (error) { /home/ccuser/the-50-dollar-app/src/app/(authenticated)/messages/[conversationId]/page.tsx:106: console.error("Error fetching conversation:", error); /home/ccuser/the-50-dollar-app/src/app/(authenticated)/messages/[conversationId]/page.tsx-107- } finally { /home/ccuser/the-50-dollar-app/src/app/(authenticated)/messages/[conversationId]/page.tsx-108- setLoading(false); -- /home/ccuser/the-50-dollar-app/src/app/(authenticated)/messages/[conversationId]/page.tsx-147- } /home/ccuser/the-50-dollar-app/src/app/(authenticated)/messages/[conversationId]/page.tsx-148- } catch (error) { /home/ccuser/the-50-dollar-app/src/app/(authenticated)/messages/[conversationId]/page.tsx:149: console.error("Error sending message:", error); /home/ccuser/the-50-dollar-app/src/app/(authenticated)/messages/[conversationId]/page.tsx-150- setMessages(prev => prev.filter(msg => msg.id !== tempId)); /home/ccuser/the-50-dollar-app/src/app/(authenticated)/messages/[conversationId]/page.tsx-151- setMessage(messageContent); -- /home/ccuser/the-50-dollar-app/src/app/(authenticated)/messages/page.tsx-75- } /home/ccuser/the-50-dollar-app/src/app/(authenticated)/messages/page.tsx-76- } catch (error) { /home/ccuser/the-50-dollar-app/src/app/(authenticated)/messages/page.tsx:77: console.error("Error fetching conversations:", error); /home/ccuser/the-50-dollar-app/src/app/(authenticated)/messages/page.tsx-78- } finally { /home/ccuser/the-50-dollar-app/src/app/(authenticated)/messages/page.tsx-79- setLoading(false); -- /home/ccuser/the-50-dollar-app/src/app/(authenticated)/messages/error.tsx-12-}) { /home/ccuser/the-50-dollar-app/src/app/(authenticated)/messages/error.tsx-13- useEffect(() => { /home/ccuser/the-50-dollar-app/src/app/(authenticated)/messages/error.tsx:14: console.error('Messages route error:', error); /home/ccuser/the-50-dollar-app/src/app/(authenticated)/messages/error.tsx-15- }, [error]); /home/ccuser/the-50-dollar-app/src/app/(authenticated)/messages/error.tsx-16- -- /home/ccuser/the-50-dollar-app/src/app/(authenticated)/error.tsx-13- useEffect(() => { /home/ccuser/the-50-dollar-app/src/app/(authenticated)/error.tsx-14- // Log the error to an error reporting service /home/ccuser/the-50-dollar-app/src/app/(authenticated)/error.tsx:15: console.error('Authenticated route error boundary caught:', error); /home/ccuser/the-50-dollar-app/src/app/(authenticated)/error.tsx-16- }, [error]); /home/ccuser/the-50-dollar-app/src/app/(authenticated)/error.tsx-17- -- /home/ccuser/the-50-dollar-app/src/app/(authenticated)/worker/error.tsx-12-}) { /home/ccuser/the-50-dollar-app/src/app/(authenticated)/worker/error.tsx-13- useEffect(() => { /home/ccuser/the-50-dollar-app/src/app/(authenticated)/worker/error.tsx:14: console.error('Worker route error:', error); /home/ccuser/the-50-dollar-app/src/app/(authenticated)/worker/error.tsx-15- }, [error]); /home/ccuser/the-50-dollar-app/src/app/(authenticated)/worker/error.tsx-16- -- /home/ccuser/the-50-dollar-app/src/app/(authenticated)/worker/profile/error.tsx-17- useEffect(() => { /home/ccuser/the-50-dollar-app/src/app/(authenticated)/worker/profile/error.tsx-18- // Log the error to an error reporting service /home/ccuser/the-50-dollar-app/src/app/(authenticated)/worker/profile/error.tsx:19: console.error("Worker profile error:", error); /home/ccuser/the-50-dollar-app/src/app/(authenticated)/worker/profile/error.tsx-20- }, [error]); /home/ccuser/the-50-dollar-app/src/app/(authenticated)/worker/profile/error.tsx-21- -- /home/ccuser/the-50-dollar-app/src/app/(authenticated)/worker/profile/build/page.tsx-178- setStep("review"); /home/ccuser/the-50-dollar-app/src/app/(authenticated)/worker/profile/build/page.tsx-179- } catch (error) { /home/ccuser/the-50-dollar-app/src/app/(authenticated)/worker/profile/build/page.tsx:180: console.error("Generation error:", error); /home/ccuser/the-50-dollar-app/src/app/(authenticated)/worker/profile/build/page.tsx-181- const message = error instanceof Error ? error.message : "Failed to generate profile"; /home/ccuser/the-50-dollar-app/src/app/(authenticated)/worker/profile/build/page.tsx-182- toast.error(`${message}. Please try again.`); -- /home/ccuser/the-50-dollar-app/src/app/(authenticated)/worker/profile/build/page.tsx-263- } /home/ccuser/the-50-dollar-app/src/app/(authenticated)/worker/profile/build/page.tsx-264- } catch (error) { /home/ccuser/the-50-dollar-app/src/app/(authenticated)/worker/profile/build/page.tsx:265: console.error("Voice processing error:", error); /home/ccuser/the-50-dollar-app/src/app/(authenticated)/worker/profile/build/page.tsx-266- setVoiceError(error instanceof Error ? error.message : "Something went wrong. Please try again."); /home/ccuser/the-50-dollar-app/src/app/(authenticated)/worker/profile/build/page.tsx-267- setVoiceStatus(""); -- /home/ccuser/the-50-dollar-app/src/app/(authenticated)/worker/profile/build/page.tsx-332- router.refresh(); /home/ccuser/the-50-dollar-app/src/app/(authenticated)/worker/profile/build/page.tsx-333- } catch (error) { /home/ccuser/the-50-dollar-app/src/app/(authenticated)/worker/profile/build/page.tsx:334: console.error("Save error:", error); /home/ccuser/the-50-dollar-app/src/app/(authenticated)/worker/profile/build/page.tsx-335- toast.error("Failed to save profile. Please try again."); /home/ccuser/the-50-dollar-app/src/app/(authenticated)/worker/profile/build/page.tsx-336- } finally { -- /home/ccuser/the-50-dollar-app/src/app/(authenticated)/worker/signup/page.tsx-219- /home/ccuser/the-50-dollar-app/src/app/(authenticated)/worker/signup/page.tsx-220- if (profileResult.error) { /home/ccuser/the-50-dollar-app/src/app/(authenticated)/worker/signup/page.tsx:221: console.error("Profile update failed:", profileResult.error); /home/ccuser/the-50-dollar-app/src/app/(authenticated)/worker/signup/page.tsx-222- toast.error(`Profile update failed: ${profileResult.error.message}`); /home/ccuser/the-50-dollar-app/src/app/(authenticated)/worker/signup/page.tsx-223- setSaving(false); -- /home/ccuser/the-50-dollar-app/src/app/(authenticated)/worker/signup/page.tsx-240- /home/ccuser/the-50-dollar-app/src/app/(authenticated)/worker/signup/page.tsx-241- if (workerResult.error) { /home/ccuser/the-50-dollar-app/src/app/(authenticated)/worker/signup/page.tsx:242: console.error("Worker profile insert failed:", workerResult.error); /home/ccuser/the-50-dollar-app/src/app/(authenticated)/worker/signup/page.tsx-243- toast.error(`Worker profile creation failed: ${workerResult.error.message}`); /home/ccuser/the-50-dollar-app/src/app/(authenticated)/worker/signup/page.tsx-244- setSaving(false); -- /home/ccuser/the-50-dollar-app/src/app/(authenticated)/worker/signup/page.tsx-250- router.refresh(); /home/ccuser/the-50-dollar-app/src/app/(authenticated)/worker/signup/page.tsx-251- } catch (error: any) { /home/ccuser/the-50-dollar-app/src/app/(authenticated)/worker/signup/page.tsx:252: console.error("Signup error:", error); /home/ccuser/the-50-dollar-app/src/app/(authenticated)/worker/signup/page.tsx-253- toast.error(`Something went wrong: ${error.message || "Unknown error"}`); /home/ccuser/the-50-dollar-app/src/app/(authenticated)/worker/signup/page.tsx-254- setSaving(false); -- /home/ccuser/the-50-dollar-app/src/app/api/messages/route.ts-18- /home/ccuser/the-50-dollar-app/src/app/api/messages/route.ts-19- if (error) { /home/ccuser/the-50-dollar-app/src/app/api/messages/route.ts:20: console.error("Error fetching conversations:", error); /home/ccuser/the-50-dollar-app/src/app/api/messages/route.ts-21- return NextResponse.json( /home/ccuser/the-50-dollar-app/src/app/api/messages/route.ts-22- { error: "Failed to fetch conversations" }, -- /home/ccuser/the-50-dollar-app/src/app/api/messages/route.ts-27- return NextResponse.json({ conversations: conversations || [] }); /home/ccuser/the-50-dollar-app/src/app/api/messages/route.ts-28- } catch (error) { /home/ccuser/the-50-dollar-app/src/app/api/messages/route.ts:29: console.error("Error in messages API:", error); /home/ccuser/the-50-dollar-app/src/app/api/messages/route.ts-30- return NextResponse.json( /home/ccuser/the-50-dollar-app/src/app/api/messages/route.ts-31- { error: "Internal server error" }, -- /home/ccuser/the-50-dollar-app/src/app/api/messages/[id]/route.ts-109- }); /home/ccuser/the-50-dollar-app/src/app/api/messages/[id]/route.ts-110- } catch (error) { /home/ccuser/the-50-dollar-app/src/app/api/messages/[id]/route.ts:111: console.error("Error in conversation API:", error); /home/ccuser/the-50-dollar-app/src/app/api/messages/[id]/route.ts-112- return NextResponse.json( /home/ccuser/the-50-dollar-app/src/app/api/messages/[id]/route.ts-113- { error: "Internal server error" }, -- /home/ccuser/the-50-dollar-app/src/app/api/messages/[id]/send/route.ts-67- /home/ccuser/the-50-dollar-app/src/app/api/messages/[id]/send/route.ts-68- if (messageError) { /home/ccuser/the-50-dollar-app/src/app/api/messages/[id]/send/route.ts:69: console.error("Error sending message:", messageError); /home/ccuser/the-50-dollar-app/src/app/api/messages/[id]/send/route.ts-70- return NextResponse.json( /home/ccuser/the-50-dollar-app/src/app/api/messages/[id]/send/route.ts-71- { error: "Failed to send message" }, -- /home/ccuser/the-50-dollar-app/src/app/api/messages/[id]/send/route.ts-113- }); /home/ccuser/the-50-dollar-app/src/app/api/messages/[id]/send/route.ts-114- } catch (error) { /home/ccuser/the-50-dollar-app/src/app/api/messages/[id]/send/route.ts:115: console.error("Error in send message API:", error); /home/ccuser/the-50-dollar-app/src/app/api/messages/[id]/send/route.ts-116- return NextResponse.json( /home/ccuser/the-50-dollar-app/src/app/api/messages/[id]/send/route.ts-117- { error: "Internal server error" }, -- /home/ccuser/the-50-dollar-app/src/app/api/messages/start/route.ts-44- /home/ccuser/the-50-dollar-app/src/app/api/messages/start/route.ts-45- if (conversationError) { /home/ccuser/the-50-dollar-app/src/app/api/messages/start/route.ts:46: console.error("Error creating conversation:", conversationError); /home/ccuser/the-50-dollar-app/src/app/api/messages/start/route.ts-47- return NextResponse.json( /home/ccuser/the-50-dollar-app/src/app/api/messages/start/route.ts-48- { error: "Failed to create conversation" }, -- /home/ccuser/the-50-dollar-app/src/app/api/messages/start/route.ts-62- /home/ccuser/the-50-dollar-app/src/app/api/messages/start/route.ts-63- if (messageError) { /home/ccuser/the-50-dollar-app/src/app/api/messages/start/route.ts:64: console.error("Error sending initial message:", messageError); /home/ccuser/the-50-dollar-app/src/app/api/messages/start/route.ts-65- // Don't fail the whole request if message fails /home/ccuser/the-50-dollar-app/src/app/api/messages/start/route.ts-66- } -- /home/ccuser/the-50-dollar-app/src/app/api/messages/start/route.ts-72- }); /home/ccuser/the-50-dollar-app/src/app/api/messages/start/route.ts-73- } catch (error) { /home/ccuser/the-50-dollar-app/src/app/api/messages/start/route.ts:74: console.error("Error in start conversation API:", error); /home/ccuser/the-50-dollar-app/src/app/api/messages/start/route.ts-75- return NextResponse.json( /home/ccuser/the-50-dollar-app/src/app/api/messages/start/route.ts-76- { error: "Internal server error" }, -- /home/ccuser/the-50-dollar-app/src/app/api/abn-lookup/route.ts-282- if (!abrResponse.ok) { /home/ccuser/the-50-dollar-app/src/app/api/abn-lookup/route.ts-283- const text = await abrResponse.text(); /home/ccuser/the-50-dollar-app/src/app/api/abn-lookup/route.ts:284: console.error(`[ABN Lookup] ABR error ${abrResponse.status}:`, text); /home/ccuser/the-50-dollar-app/src/app/api/abn-lookup/route.ts-285- return NextResponse.json({ /home/ccuser/the-50-dollar-app/src/app/api/abn-lookup/route.ts-286- success: false, -- /home/ccuser/the-50-dollar-app/src/app/api/abn-lookup/route.ts-317- /home/ccuser/the-50-dollar-app/src/app/api/abn-lookup/route.ts-318- } catch (err: any) { /home/ccuser/the-50-dollar-app/src/app/api/abn-lookup/route.ts:319: console.error('[ABN Lookup] Uncaught error:', err); /home/ccuser/the-50-dollar-app/src/app/api/abn-lookup/route.ts-320- return NextResponse.json({ /home/ccuser/the-50-dollar-app/src/app/api/abn-lookup/route.ts-321- success: false, -- /home/ccuser/the-50-dollar-app/src/app/api/match/find-matches/route.ts-72- /home/ccuser/the-50-dollar-app/src/app/api/match/find-matches/route.ts-73- if (workersError) { /home/ccuser/the-50-dollar-app/src/app/api/match/find-matches/route.ts:74: console.error("Error fetching workers:", workersError); /home/ccuser/the-50-dollar-app/src/app/api/match/find-matches/route.ts-75- return NextResponse.json({ error: "Failed to fetch workers" }, { status: 500 }); /home/ccuser/the-50-dollar-app/src/app/api/match/find-matches/route.ts-76- } -- /home/ccuser/the-50-dollar-app/src/app/api/match/find-matches/route.ts-220- /home/ccuser/the-50-dollar-app/src/app/api/match/find-matches/route.ts-221- if (insertError) { /home/ccuser/the-50-dollar-app/src/app/api/match/find-matches/route.ts:222: console.error("Error inserting matches:", insertError); /home/ccuser/the-50-dollar-app/src/app/api/match/find-matches/route.ts-223- return NextResponse.json({ error: "Failed to save matches" }, { status: 500 }); /home/ccuser/the-50-dollar-app/src/app/api/match/find-matches/route.ts-224- } -- /home/ccuser/the-50-dollar-app/src/app/api/match/find-matches/route.ts-231- }); /home/ccuser/the-50-dollar-app/src/app/api/match/find-matches/route.ts-232- } catch (error) { /home/ccuser/the-50-dollar-app/src/app/api/match/find-matches/route.ts:233: console.error("Match finding error:", error); /home/ccuser/the-50-dollar-app/src/app/api/match/find-matches/route.ts-234- return NextResponse.json( /home/ccuser/the-50-dollar-app/src/app/api/match/find-matches/route.ts-235- { error: "Failed to find matches" }, -- /home/ccuser/the-50-dollar-app/src/app/api/company-logo/route.ts-118- /home/ccuser/the-50-dollar-app/src/app/api/company-logo/route.ts-119- } catch (error) { /home/ccuser/the-50-dollar-app/src/app/api/company-logo/route.ts:120: console.error('Logo fetch error:', error); /home/ccuser/the-50-dollar-app/src/app/api/company-logo/route.ts-121- /home/ccuser/the-50-dollar-app/src/app/api/company-logo/route.ts-122- return NextResponse.json( -- /home/ccuser/the-50-dollar-app/src/app/api/webhooks/stripe/route.ts-23- event = constructWebhookEvent(payload, signature); /home/ccuser/the-50-dollar-app/src/app/api/webhooks/stripe/route.ts-24- } catch (error) { /home/ccuser/the-50-dollar-app/src/app/api/webhooks/stripe/route.ts:25: console.error('Webhook signature verification failed:', error); /home/ccuser/the-50-dollar-app/src/app/api/webhooks/stripe/route.ts-26- return NextResponse.json({ error: 'Invalid signature' }, { status: 400 }); /home/ccuser/the-50-dollar-app/src/app/api/webhooks/stripe/route.ts-27- } -- /home/ccuser/the-50-dollar-app/src/app/api/webhooks/stripe/route.ts-55- return NextResponse.json({ received: true }); /home/ccuser/the-50-dollar-app/src/app/api/webhooks/stripe/route.ts-56- } catch (error) { /home/ccuser/the-50-dollar-app/src/app/api/webhooks/stripe/route.ts:57: console.error('Webhook error:', error); /home/ccuser/the-50-dollar-app/src/app/api/webhooks/stripe/route.ts-58- return NextResponse.json({ error: 'Webhook processing failed' }, { status: 500 }); /home/ccuser/the-50-dollar-app/src/app/api/webhooks/stripe/route.ts-59- } -- /home/ccuser/the-50-dollar-app/src/app/api/webhooks/stripe/route.ts-67- /home/ccuser/the-50-dollar-app/src/app/api/webhooks/stripe/route.ts-68- if (!matchId) { /home/ccuser/the-50-dollar-app/src/app/api/webhooks/stripe/route.ts:69: console.error('No match_id in payment intent metadata'); /home/ccuser/the-50-dollar-app/src/app/api/webhooks/stripe/route.ts-70- return; /home/ccuser/the-50-dollar-app/src/app/api/webhooks/stripe/route.ts-71- } -- /home/ccuser/the-50-dollar-app/src/app/api/webhooks/stripe/route.ts-83- /home/ccuser/the-50-dollar-app/src/app/api/webhooks/stripe/route.ts-84- if (paymentError) { /home/ccuser/the-50-dollar-app/src/app/api/webhooks/stripe/route.ts:85: console.error('Error updating payment status:', paymentError); /home/ccuser/the-50-dollar-app/src/app/api/webhooks/stripe/route.ts-86- return; /home/ccuser/the-50-dollar-app/src/app/api/webhooks/stripe/route.ts-87- } /home/ccuser/the-50-dollar-app/src/app/api/webhooks/stripe/route.ts-88- /home/ccuser/the-50-dollar-app/src/app/api/webhooks/stripe/route.ts-89- if (!payment) { /home/ccuser/the-50-dollar-app/src/app/api/webhooks/stripe/route.ts:90: console.error('Payment not found for intent:', paymentIntent.id); /home/ccuser/the-50-dollar-app/src/app/api/webhooks/stripe/route.ts-91- return; /home/ccuser/the-50-dollar-app/src/app/api/webhooks/stripe/route.ts-92- } -- /home/ccuser/the-50-dollar-app/src/app/api/webhooks/stripe/route.ts-104- /home/ccuser/the-50-dollar-app/src/app/api/webhooks/stripe/route.ts-105- if (matchError) { /home/ccuser/the-50-dollar-app/src/app/api/webhooks/stripe/route.ts:106: console.error('Error updating match status:', matchError); /home/ccuser/the-50-dollar-app/src/app/api/webhooks/stripe/route.ts-107- return; /home/ccuser/the-50-dollar-app/src/app/api/webhooks/stripe/route.ts-108- } -- /home/ccuser/the-50-dollar-app/src/app/api/webhooks/stripe/route.ts-128- console.log('Payment success processed for match:', matchId); /home/ccuser/the-50-dollar-app/src/app/api/webhooks/stripe/route.ts-129- } catch (error) { /home/ccuser/the-50-dollar-app/src/app/api/webhooks/stripe/route.ts:130: console.error('Error processing payment success:', error); /home/ccuser/the-50-dollar-app/src/app/api/webhooks/stripe/route.ts-131- } /home/ccuser/the-50-dollar-app/src/app/api/webhooks/stripe/route.ts-132-} -- /home/ccuser/the-50-dollar-app/src/app/api/webhooks/stripe/route.ts-145- /home/ccuser/the-50-dollar-app/src/app/api/webhooks/stripe/route.ts-146- if (error) { /home/ccuser/the-50-dollar-app/src/app/api/webhooks/stripe/route.ts:147: console.error('Error updating payment failure:', error); /home/ccuser/the-50-dollar-app/src/app/api/webhooks/stripe/route.ts-148- } /home/ccuser/the-50-dollar-app/src/app/api/webhooks/stripe/route.ts-149- /home/ccuser/the-50-dollar-app/src/app/api/webhooks/stripe/route.ts-150- console.log('Payment failed for intent:', paymentIntent.id); /home/ccuser/the-50-dollar-app/src/app/api/webhooks/stripe/route.ts-151- } catch (error) { /home/ccuser/the-50-dollar-app/src/app/api/webhooks/stripe/route.ts:152: console.error('Error handling payment failure:', error); /home/ccuser/the-50-dollar-app/src/app/api/webhooks/stripe/route.ts-153- } /home/ccuser/the-50-dollar-app/src/app/api/webhooks/stripe/route.ts-154-} -- /home/ccuser/the-50-dollar-app/src/app/api/webhooks/stripe/route.ts-166- /home/ccuser/the-50-dollar-app/src/app/api/webhooks/stripe/route.ts-167- if (error) { /home/ccuser/the-50-dollar-app/src/app/api/webhooks/stripe/route.ts:168: console.error('Error deleting cancelled payment:', error); /home/ccuser/the-50-dollar-app/src/app/api/webhooks/stripe/route.ts-169- } /home/ccuser/the-50-dollar-app/src/app/api/webhooks/stripe/route.ts-170- /home/ccuser/the-50-dollar-app/src/app/api/webhooks/stripe/route.ts-171- console.log('Payment cancelled for intent:', paymentIntent.id); /home/ccuser/the-50-dollar-app/src/app/api/webhooks/stripe/route.ts-172- } catch (error) { /home/ccuser/the-50-dollar-app/src/app/api/webhooks/stripe/route.ts:173: console.error('Error handling payment cancellation:', error); /home/ccuser/the-50-dollar-app/src/app/api/webhooks/stripe/route.ts-174- } /home/ccuser/the-50-dollar-app/src/app/api/webhooks/stripe/route.ts-175-} -- /home/ccuser/the-50-dollar-app/src/app/api/ai/generate-profile/route.ts-106- }); /home/ccuser/the-50-dollar-app/src/app/api/ai/generate-profile/route.ts-107- } catch (error) { /home/ccuser/the-50-dollar-app/src/app/api/ai/generate-profile/route.ts:108: console.error("AI generation error:", error); /home/ccuser/the-50-dollar-app/src/app/api/ai/generate-profile/route.ts-109- /home/ccuser/the-50-dollar-app/src/app/api/ai/generate-profile/route.ts-110- // Return more specific error messages -- /home/ccuser/the-50-dollar-app/src/app/api/ai/parse-profile-voice/route.ts-120- return Response.json(parsed); /home/ccuser/the-50-dollar-app/src/app/api/ai/parse-profile-voice/route.ts-121- } catch (error) { /home/ccuser/the-50-dollar-app/src/app/api/ai/parse-profile-voice/route.ts:122: console.error("OpenAI parsing error:", error); /home/ccuser/the-50-dollar-app/src/app/api/ai/parse-profile-voice/route.ts-123- if (error instanceof APIError) { /home/ccuser/the-50-dollar-app/src/app/api/ai/parse-profile-voice/route.ts-124- throw error; -- /home/ccuser/the-50-dollar-app/src/app/api/ai/transcribe-voice/route.ts-54- return Response.json({ text: transcription.text }); /home/ccuser/the-50-dollar-app/src/app/api/ai/transcribe-voice/route.ts-55- } catch (error) { /home/ccuser/the-50-dollar-app/src/app/api/ai/transcribe-voice/route.ts:56: console.error("OpenAI transcription error:", error); /home/ccuser/the-50-dollar-app/src/app/api/ai/transcribe-voice/route.ts-57- throw new APIError( /home/ccuser/the-50-dollar-app/src/app/api/ai/transcribe-voice/route.ts-58- "Failed to transcribe audio", -- /home/ccuser/the-50-dollar-app/src/app/api/payments/create/route.ts-138- }); /home/ccuser/the-50-dollar-app/src/app/api/payments/create/route.ts-139- } catch (error) { /home/ccuser/the-50-dollar-app/src/app/api/payments/create/route.ts:140: console.error('Payment creation error:', error); /home/ccuser/the-50-dollar-app/src/app/api/payments/create/route.ts-141- if (error instanceof Error && error.message.includes('Stripe')) { /home/ccuser/the-50-dollar-app/src/app/api/payments/create/route.ts-142- return NextResponse.json({ error: 'Payment service unavailable' }, { status: 503 }); -- /home/ccuser/the-50-dollar-app/src/app/api/auth/verify-email/route.ts-38- /home/ccuser/the-50-dollar-app/src/app/api/auth/verify-email/route.ts-39- } catch (error) { /home/ccuser/the-50-dollar-app/src/app/api/auth/verify-email/route.ts:40: console.error('Email verification error:', error) /home/ccuser/the-50-dollar-app/src/app/api/auth/verify-email/route.ts-41- return NextResponse.json( /home/ccuser/the-50-dollar-app/src/app/api/auth/verify-email/route.ts-42- { error: 'Internal server error' }, -- /home/ccuser/the-50-dollar-app/src/app/api/auth/csrf/route.ts-21- return createCSRTEndpoint(request); /home/ccuser/the-50-dollar-app/src/app/api/auth/csrf/route.ts-22- } catch (error) { /home/ccuser/the-50-dollar-app/src/app/api/auth/csrf/route.ts:23: console.error('CSRF token generation error:', error); /home/ccuser/the-50-dollar-app/src/app/api/auth/csrf/route.ts-24- return NextResponse.json({ error: 'Internal server error' }, { status: 500 }); /home/ccuser/the-50-dollar-app/src/app/api/auth/csrf/route.ts-25- } -- /home/ccuser/the-50-dollar-app/src/app/auth/error.tsx-12-}) { /home/ccuser/the-50-dollar-app/src/app/auth/error.tsx-13- useEffect(() => { /home/ccuser/the-50-dollar-app/src/app/auth/error.tsx:14: console.error('Auth error:', error); /home/ccuser/the-50-dollar-app/src/app/auth/error.tsx-15- }, [error]); /home/ccuser/the-50-dollar-app/src/app/auth/error.tsx-16-