diff --git a/app/_layout.tsx b/app/_layout.tsx index 9b5546c..4a0343a 100644 --- a/app/_layout.tsx +++ b/app/_layout.tsx @@ -315,7 +315,7 @@ export default function RootLayout() { return { name, success: true }; } catch (error) { if (__DEV__) { - console.warn(`[Store] ${name} initialization failed:`, error); + console.warn("[Store] initialization failed", { store: name, error }); } return { name, success: false, error }; } diff --git a/components/ui/SectionErrorBoundary.tsx b/components/ui/SectionErrorBoundary.tsx index efc243d..498d7fe 100644 --- a/components/ui/SectionErrorBoundary.tsx +++ b/components/ui/SectionErrorBoundary.tsx @@ -29,11 +29,11 @@ export class SectionErrorBoundary extends Component { } componentDidCatch(error: Error, errorInfo: React.ErrorInfo) { - console.error( - `[SectionErrorBoundary] Error in ${this.props.sectionName}:`, + console.error("[SectionErrorBoundary] error captured", { + sectionName: this.props.sectionName, error, errorInfo, - ); + }); } handleRetry = () => { diff --git a/env.example b/env.example index 97500ba..de5930a 100644 --- a/env.example +++ b/env.example @@ -5,4 +5,4 @@ # Supabase Configuration (Frankfurt - eu-central-1) EXPO_PUBLIC_SUPABASE_URL=https://shchfellocvnhrhhtiui.supabase.co -EXPO_PUBLIC_SUPABASE_ANON_KEY=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6InNoY2hmZWxsb2N2bmhyaGh0aXVpIiwicm9sZSI6ImFub24iLCJpYXQiOjE3Njg0Mzk5ODMsImV4cCI6MjA4NDAxNTk4M30.UiJpkUBYWNtEff4o4xptSx02PWlS-MN6AC_Xn8K5IxE +EXPO_PUBLIC_SUPABASE_ANON_KEY=replace-with-your-supabase-anon-key diff --git a/utils/storage.ts b/utils/storage.ts index 6f9146c..374919d 100644 --- a/utils/storage.ts +++ b/utils/storage.ts @@ -27,7 +27,10 @@ export function setStorageErrorHandler(callback: StorageErrorCallback): void { */ export function handleStorageError(error: unknown, operation: string): void { const err = error instanceof Error ? error : new Error(String(error)); - console.error(`[Storage] ${operation} failed:`, err.message); + console.error("[Storage] operation failed", { + operation, + message: err.message, + }); if (onStorageError) { onStorageError(err, operation);