notify.d.ts 734 B

1234567891011121314151617181920212223
  1. import { Feature } from '../featureManager';
  2. export declare class NotifyOptions {
  3. catchExceptions: boolean;
  4. }
  5. export declare class ErrorContext {
  6. http?: Object;
  7. custom?: Object;
  8. }
  9. export declare class NotifyFeature implements Feature {
  10. private logger;
  11. private transport;
  12. private cache;
  13. private stackParser;
  14. init(options?: NotifyOptions): any;
  15. destroy(): void;
  16. getSafeError(err: any): Error;
  17. notifyError(err: Error | string | {}, context?: ErrorContext): any;
  18. private onUncaughtException;
  19. private onUnhandledRejection;
  20. private catchAll;
  21. expressErrorHandler(): (err: any, req: any, res: any, next: any) => any;
  22. koaErrorHandler(): (ctx: any, next: any) => Promise<void>;
  23. }