view data fixes
This commit is contained in:
@@ -2,10 +2,10 @@
|
||||
* Enhanced Error Reporter with user notifications and environment-specific handling
|
||||
*/
|
||||
|
||||
import { connectionMonitor } from '../gateways/api/base/ApiConnectionMonitor';
|
||||
import { ApiError } from '../gateways/api/base/ApiError';
|
||||
import { ErrorReporter } from '../interfaces/ErrorReporter';
|
||||
import { Logger } from '../interfaces/Logger';
|
||||
import { ApiError } from '../api/base/ApiError';
|
||||
import { connectionMonitor } from '../api/base/ApiConnectionMonitor';
|
||||
|
||||
// Import notification system (will be used if available)
|
||||
try {
|
||||
|
||||
@@ -3,9 +3,9 @@
|
||||
* Allows developers to replay errors with the exact same context
|
||||
*/
|
||||
|
||||
import { getGlobalErrorHandler } from './GlobalErrorHandler';
|
||||
import { ApiError } from '../gateways/api/base/ApiError';
|
||||
import { getGlobalApiLogger } from './ApiRequestLogger';
|
||||
import { ApiError } from '../api/base/ApiError';
|
||||
import { getGlobalErrorHandler } from './GlobalErrorHandler';
|
||||
|
||||
export interface ReplayContext {
|
||||
timestamp: string;
|
||||
@@ -178,7 +178,7 @@ export class ErrorReplaySystem {
|
||||
const error = replay.error.type === 'ApiError'
|
||||
? new ApiError(
|
||||
replay.error.message,
|
||||
((replay.error.context as { type?: string } | undefined)?.type as import('../api/base/ApiError').ApiErrorType) || 'UNKNOWN_ERROR',
|
||||
((replay.error.context as { type?: string } | undefined)?.type as import('../gateways/api/base/ApiError').ApiErrorType) || 'UNKNOWN_ERROR',
|
||||
{
|
||||
timestamp: replay.timestamp,
|
||||
...(replay.error.context as Record<string, unknown> | undefined),
|
||||
|
||||
@@ -3,10 +3,9 @@
|
||||
* Captures all uncaught errors, promise rejections, and React errors
|
||||
*/
|
||||
|
||||
import { ApiError } from '../api/base/ApiError';
|
||||
import { getGlobalErrorReporter } from './EnhancedErrorReporter';
|
||||
import { ConsoleLogger } from './logging/ConsoleLogger';
|
||||
import { ApiError } from '../gateways/api/base/ApiError';
|
||||
import { getGlobalReplaySystem } from './ErrorReplay';
|
||||
import { ConsoleLogger } from './logging/ConsoleLogger';
|
||||
|
||||
export interface GlobalErrorHandlerOptions {
|
||||
/**
|
||||
@@ -38,7 +37,6 @@ export interface GlobalErrorHandlerOptions {
|
||||
export class GlobalErrorHandler {
|
||||
private options: GlobalErrorHandlerOptions;
|
||||
private logger: ConsoleLogger;
|
||||
private errorReporter: ReturnType<typeof getGlobalErrorReporter>;
|
||||
private errorHistory: Array<{
|
||||
error: Error | ApiError;
|
||||
timestamp: string;
|
||||
@@ -58,7 +56,6 @@ export class GlobalErrorHandler {
|
||||
};
|
||||
|
||||
this.logger = new ConsoleLogger();
|
||||
this.errorReporter = getGlobalErrorReporter();
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user