mirror of
https://github.com/pacnpal/thrilltrack-explorer.git
synced 2025-12-21 10:51:13 -05:00
Fix Recent Activity errors
This commit is contained in:
@@ -35,13 +35,29 @@ export const handleError = (
|
||||
? error.message
|
||||
: 'An unexpected error occurred';
|
||||
|
||||
// Log to console/monitoring
|
||||
// Log to console/monitoring with enhanced debugging
|
||||
const stack = error instanceof Error ? error.stack : undefined;
|
||||
|
||||
logger.error('Error occurred', {
|
||||
...context,
|
||||
error: error instanceof Error ? error.message : String(error),
|
||||
stack: error instanceof Error ? error.stack : undefined,
|
||||
stack,
|
||||
errorId,
|
||||
errorType: typeof error,
|
||||
errorConstructor: error?.constructor?.name,
|
||||
hasStack: !!stack,
|
||||
});
|
||||
|
||||
// Additional debug logging when stack is missing
|
||||
if (!stack) {
|
||||
console.error('[handleError] Error without stack trace:', {
|
||||
type: typeof error,
|
||||
constructor: error?.constructor?.name,
|
||||
error: error,
|
||||
context,
|
||||
errorId
|
||||
});
|
||||
}
|
||||
|
||||
// Log to database with breadcrumbs (non-blocking)
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user