Enhanced PostHog Error Tracking with Detailed Messages (#6176)
This commit is contained in:
+11
-1
@@ -43,7 +43,7 @@ import { NoProviderOrModelError, useAgent } from './hooks/useAgent';
|
||||
import { useNavigation } from './hooks/useNavigation';
|
||||
import { errorMessage } from './utils/conversionUtils';
|
||||
import { usePageViewTracking } from './hooks/useAnalytics';
|
||||
import { trackOnboardingCompleted } from './utils/analytics';
|
||||
import { trackOnboardingCompleted, trackErrorWithContext } from './utils/analytics';
|
||||
|
||||
function PageViewTracker() {
|
||||
usePageViewTracking();
|
||||
@@ -129,6 +129,11 @@ const PairRouteWrapper = ({
|
||||
setActiveSessionId(newSession.id);
|
||||
} catch (error) {
|
||||
console.error('[PairRouteWrapper] Failed to create session:', error);
|
||||
trackErrorWithContext(error, {
|
||||
component: 'PairRouteWrapper',
|
||||
action: 'create_session',
|
||||
recoverable: true,
|
||||
});
|
||||
} finally {
|
||||
setIsCreatingSession(false);
|
||||
}
|
||||
@@ -428,6 +433,11 @@ export function AppInner() {
|
||||
});
|
||||
} catch (error) {
|
||||
console.error('Unexpected error opening shared session:', error);
|
||||
trackErrorWithContext(error, {
|
||||
component: 'AppInner',
|
||||
action: 'open_shared_session',
|
||||
recoverable: true,
|
||||
});
|
||||
// Navigate to shared session view with error
|
||||
const shareToken = link.replace('goose://sessions/', '');
|
||||
const options = {
|
||||
|
||||
Reference in New Issue
Block a user