Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion app/_layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 };
}
Expand Down
6 changes: 3 additions & 3 deletions components/ui/SectionErrorBoundary.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,11 @@ export class SectionErrorBoundary extends Component<Props, State> {
}

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 = () => {
Expand Down
2 changes: 1 addition & 1 deletion env.example
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@

# Supabase Configuration (Frankfurt - eu-central-1)
EXPO_PUBLIC_SUPABASE_URL=https://shchfellocvnhrhhtiui.supabase.co
Copy link

Copilot AI Mar 29, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

env.example now uses a placeholder anon key, but the Supabase URL is still a specific project URL. Since anon keys are project-specific, leaving a real URL here is misleading (copy/paste will fail unless the user also changes the URL) and may unintentionally point people at a real project. Consider replacing the URL with a neutral placeholder to match the key.

Suggested change
EXPO_PUBLIC_SUPABASE_URL=https://shchfellocvnhrhhtiui.supabase.co
EXPO_PUBLIC_SUPABASE_URL=https://your-project-ref.supabase.co

Copilot uses AI. Check for mistakes.
EXPO_PUBLIC_SUPABASE_ANON_KEY=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6InNoY2hmZWxsb2N2bmhyaGh0aXVpIiwicm9sZSI6ImFub24iLCJpYXQiOjE3Njg0Mzk5ODMsImV4cCI6MjA4NDAxNTk4M30.UiJpkUBYWNtEff4o4xptSx02PWlS-MN6AC_Xn8K5IxE
EXPO_PUBLIC_SUPABASE_ANON_KEY=replace-with-your-supabase-anon-key
5 changes: 4 additions & 1 deletion utils/storage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Copy link

Copilot AI Mar 29, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

handleStorageError now logs only err.message inside an object. To make these errors actionable (and consistent with other error logs in the app), include the actual Error object (or at least stack) in the metadata so stack traces aren’t lost during debugging, while keeping the log message constant for semgrep.

Suggested change
message: err.message,
message: err.message,
error: err,
stack: err.stack,

Copilot uses AI. Check for mistakes.
});

if (onStorageError) {
onStorageError(err, operation);
Expand Down
Loading