@rxap/ngx-error 19.3.0 → 21.0.1-dev.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (184) hide show
  1. package/CHANGELOG.md +40 -0
  2. package/compodoc/changelog.html +38 -0
  3. package/compodoc/components/AngularErrorComponent.html +56 -41
  4. package/compodoc/components/AnyHttpErrorComponent.html +75 -57
  5. package/compodoc/components/CodeHttpErrorComponent.html +19 -19
  6. package/compodoc/components/ErrorDialogComponent.html +98 -79
  7. package/compodoc/components/MessageHttpErrorComponent.html +19 -19
  8. package/compodoc/components/OpenApiHttpResponseErrorComponent.html +50 -34
  9. package/compodoc/dependencies.html +11 -11
  10. package/compodoc/injectables/ErrorCaptureDialogService.html +9 -7
  11. package/compodoc/interfaces/IErrorCaptureDialogService.html +6 -4
  12. package/compodoc/interfaces/IErrorDialogComponent.html +14 -23
  13. package/compodoc/js/search/search_index.js +2 -2
  14. package/compodoc/properties.html +1 -1
  15. package/docs/documentation.json +1007 -1043
  16. package/docs/html/assets/hierarchy.js +1 -1
  17. package/docs/html/assets/search.js +1 -1
  18. package/docs/html/classes/AngularErrorComponent.html +2 -2
  19. package/docs/html/classes/AngularErrorService.html +2 -2
  20. package/docs/html/classes/AnyHttpErrorComponent.html +2 -2
  21. package/docs/html/classes/AnyHttpErrorService.html +2 -2
  22. package/docs/html/classes/CodeHttpErrorComponent.html +2 -2
  23. package/docs/html/classes/CodeHttpErrorService.html +2 -2
  24. package/docs/html/classes/ErrorCaptureDialogService.html +2 -2
  25. package/docs/html/classes/ErrorCaptureService.html +2 -2
  26. package/docs/html/classes/ErrorDialogComponent.html +2 -6
  27. package/docs/html/classes/MessageHttpErrorComponent.html +2 -2
  28. package/docs/html/classes/MessageHttpErrorService.html +2 -2
  29. package/docs/html/classes/OpenApiHttpResponseErrorComponent.html +2 -2
  30. package/docs/html/classes/OpenApiHttpResponseErrorService.html +2 -2
  31. package/docs/html/classes/RxapErrorHandler.html +3 -3
  32. package/docs/html/functions/DefaultErrorCodeExtractor.html +1 -1
  33. package/docs/html/functions/DefaultErrorFilter.html +1 -1
  34. package/docs/html/functions/ExtractContextFromError.html +1 -1
  35. package/docs/html/functions/ExtractError.html +1 -1
  36. package/docs/html/functions/ExtractExtraFromError.html +1 -1
  37. package/docs/html/functions/ExtractTagsFromError.html +1 -1
  38. package/docs/html/functions/HttpErrorInterceptor.html +1 -1
  39. package/docs/html/functions/PrintError.html +1 -1
  40. package/docs/html/functions/ProvideErrorHandler.html +2 -2
  41. package/docs/html/functions/SimplifyHttpErrorResponse.html +1 -1
  42. package/docs/html/functions/provideAutoErrorInterception.html +1 -1
  43. package/docs/html/functions/withErrorCaptureDialogDisabledIf.html +1 -1
  44. package/docs/html/functions/withErrorCaptureDialogService.html +1 -1
  45. package/docs/html/hierarchy.html +1 -1
  46. package/docs/html/index.html +2 -2
  47. package/docs/html/interfaces/AngularErrorDialogData.html +2 -2
  48. package/docs/html/interfaces/AnyHttpErrorDialogData.html +8 -8
  49. package/docs/html/interfaces/CodeHttpErrorDialogData.html +8 -8
  50. package/docs/html/interfaces/ErrorHandlerOptions.html +2 -2
  51. package/docs/html/interfaces/ErrorInterceptorOptions.html +2 -2
  52. package/docs/html/interfaces/IErrorCaptureDialogService.html +2 -2
  53. package/docs/html/interfaces/IErrorDialogComponent.html +2 -2
  54. package/docs/html/interfaces/MessageHttpErrorDialogData.html +8 -8
  55. package/docs/html/interfaces/OpenApiHttpResponseErrorDialogData.html +8 -8
  56. package/docs/html/interfaces/SimplifiedHttpErrorResponse.html +2 -2
  57. package/docs/html/modules.html +1 -1
  58. package/docs/html/variables/RXAP_ERROR_CAPTURE_DIALOG_SERVICE.html +1 -1
  59. package/docs/html/variables/RXAP_ERROR_DIALOG_COMPONENT.html +1 -1
  60. package/docs/html/variables/RXAP_ERROR_DIALOG_DATA.html +1 -1
  61. package/docs/html/variables/RXAP_ERROR_DIALOG_DISABLED.html +1 -1
  62. package/docs/html/variables/RXAP_ERROR_DIALOG_ERROR.html +1 -1
  63. package/docs/html/variables/RXAP_ERROR_HANDLER_OPTIONS.html +1 -1
  64. package/docs/html/variables/RXAP_ERROR_INTERCEPTOR_OPTIONS.html +1 -1
  65. package/docs/markdown/README.md +1 -1
  66. package/docs/markdown/classes/AngularErrorComponent.md +6 -6
  67. package/docs/markdown/classes/AngularErrorService.md +5 -5
  68. package/docs/markdown/classes/AnyHttpErrorComponent.md +4 -4
  69. package/docs/markdown/classes/AnyHttpErrorService.md +5 -5
  70. package/docs/markdown/classes/CodeHttpErrorComponent.md +5 -5
  71. package/docs/markdown/classes/CodeHttpErrorService.md +5 -5
  72. package/docs/markdown/classes/ErrorCaptureDialogService.md +6 -6
  73. package/docs/markdown/classes/ErrorCaptureService.md +5 -5
  74. package/docs/markdown/classes/ErrorDialogComponent.md +13 -35
  75. package/docs/markdown/classes/MessageHttpErrorComponent.md +5 -5
  76. package/docs/markdown/classes/MessageHttpErrorService.md +5 -5
  77. package/docs/markdown/classes/OpenApiHttpResponseErrorComponent.md +4 -4
  78. package/docs/markdown/classes/OpenApiHttpResponseErrorService.md +5 -5
  79. package/docs/markdown/classes/RxapErrorHandler.md +7 -7
  80. package/docs/markdown/functions/DefaultErrorCodeExtractor.md +2 -2
  81. package/docs/markdown/functions/DefaultErrorFilter.md +2 -2
  82. package/docs/markdown/functions/ExtractContextFromError.md +2 -2
  83. package/docs/markdown/functions/ExtractError.md +2 -2
  84. package/docs/markdown/functions/ExtractExtraFromError.md +2 -2
  85. package/docs/markdown/functions/ExtractTagsFromError.md +2 -2
  86. package/docs/markdown/functions/HttpErrorInterceptor.md +2 -2
  87. package/docs/markdown/functions/PrintError.md +2 -2
  88. package/docs/markdown/functions/ProvideErrorHandler.md +2 -2
  89. package/docs/markdown/functions/SimplifyHttpErrorResponse.md +2 -2
  90. package/docs/markdown/functions/provideAutoErrorInterception.md +2 -2
  91. package/docs/markdown/functions/withErrorCaptureDialogDisabledIf.md +2 -2
  92. package/docs/markdown/functions/withErrorCaptureDialogService.md +2 -2
  93. package/docs/markdown/globals.md +2 -2
  94. package/docs/markdown/interfaces/AngularErrorDialogData.md +8 -8
  95. package/docs/markdown/interfaces/AnyHttpErrorDialogData.md +15 -15
  96. package/docs/markdown/interfaces/CodeHttpErrorDialogData.md +16 -16
  97. package/docs/markdown/interfaces/ErrorHandlerOptions.md +5 -5
  98. package/docs/markdown/interfaces/ErrorInterceptorOptions.md +4 -4
  99. package/docs/markdown/interfaces/IErrorCaptureDialogService.md +3 -3
  100. package/docs/markdown/interfaces/IErrorDialogComponent.md +3 -3
  101. package/docs/markdown/interfaces/MessageHttpErrorDialogData.md +15 -15
  102. package/docs/markdown/interfaces/OpenApiHttpResponseErrorDialogData.md +18 -18
  103. package/docs/markdown/interfaces/SimplifiedHttpErrorResponse.md +12 -12
  104. package/docs/markdown/variables/RXAP_ERROR_CAPTURE_DIALOG_SERVICE.md +2 -2
  105. package/docs/markdown/variables/RXAP_ERROR_DIALOG_COMPONENT.md +2 -2
  106. package/docs/markdown/variables/RXAP_ERROR_DIALOG_DATA.md +2 -2
  107. package/docs/markdown/variables/RXAP_ERROR_DIALOG_DISABLED.md +2 -2
  108. package/docs/markdown/variables/RXAP_ERROR_DIALOG_ERROR.md +2 -2
  109. package/docs/markdown/variables/RXAP_ERROR_HANDLER_OPTIONS.md +2 -2
  110. package/docs/markdown/variables/RXAP_ERROR_INTERCEPTOR_OPTIONS.md +2 -2
  111. package/docs/wiki/Class.AngularErrorComponent.md +5 -5
  112. package/docs/wiki/Class.AngularErrorService.md +4 -4
  113. package/docs/wiki/Class.AnyHttpErrorComponent.md +3 -3
  114. package/docs/wiki/Class.AnyHttpErrorService.md +4 -4
  115. package/docs/wiki/Class.CodeHttpErrorComponent.md +4 -4
  116. package/docs/wiki/Class.CodeHttpErrorService.md +4 -4
  117. package/docs/wiki/Class.ErrorCaptureDialogService.md +5 -5
  118. package/docs/wiki/Class.ErrorCaptureService.md +4 -4
  119. package/docs/wiki/Class.ErrorDialogComponent.md +12 -34
  120. package/docs/wiki/Class.MessageHttpErrorComponent.md +4 -4
  121. package/docs/wiki/Class.MessageHttpErrorService.md +4 -4
  122. package/docs/wiki/Class.OpenApiHttpResponseErrorComponent.md +3 -3
  123. package/docs/wiki/Class.OpenApiHttpResponseErrorService.md +4 -4
  124. package/docs/wiki/Class.RxapErrorHandler.md +6 -6
  125. package/docs/wiki/Function.DefaultErrorCodeExtractor.md +1 -1
  126. package/docs/wiki/Function.DefaultErrorFilter.md +1 -1
  127. package/docs/wiki/Function.ExtractContextFromError.md +1 -1
  128. package/docs/wiki/Function.ExtractError.md +1 -1
  129. package/docs/wiki/Function.ExtractExtraFromError.md +1 -1
  130. package/docs/wiki/Function.ExtractTagsFromError.md +1 -1
  131. package/docs/wiki/Function.HttpErrorInterceptor.md +1 -1
  132. package/docs/wiki/Function.PrintError.md +1 -1
  133. package/docs/wiki/Function.ProvideErrorHandler.md +1 -1
  134. package/docs/wiki/Function.SimplifyHttpErrorResponse.md +1 -1
  135. package/docs/wiki/Function.provideAutoErrorInterception.md +1 -1
  136. package/docs/wiki/Function.withErrorCaptureDialogDisabledIf.md +1 -1
  137. package/docs/wiki/Function.withErrorCaptureDialogService.md +1 -1
  138. package/docs/wiki/Interface.AngularErrorDialogData.md +7 -7
  139. package/docs/wiki/Interface.AnyHttpErrorDialogData.md +14 -14
  140. package/docs/wiki/Interface.CodeHttpErrorDialogData.md +15 -15
  141. package/docs/wiki/Interface.ErrorHandlerOptions.md +4 -4
  142. package/docs/wiki/Interface.ErrorInterceptorOptions.md +3 -3
  143. package/docs/wiki/Interface.IErrorCaptureDialogService.md +2 -2
  144. package/docs/wiki/Interface.IErrorDialogComponent.md +2 -2
  145. package/docs/wiki/Interface.MessageHttpErrorDialogData.md +14 -14
  146. package/docs/wiki/Interface.OpenApiHttpResponseErrorDialogData.md +17 -17
  147. package/docs/wiki/Interface.SimplifiedHttpErrorResponse.md +11 -11
  148. package/docs/wiki/Variable.RXAP_ERROR_CAPTURE_DIALOG_SERVICE.md +1 -1
  149. package/docs/wiki/Variable.RXAP_ERROR_DIALOG_COMPONENT.md +1 -1
  150. package/docs/wiki/Variable.RXAP_ERROR_DIALOG_DATA.md +1 -1
  151. package/docs/wiki/Variable.RXAP_ERROR_DIALOG_DISABLED.md +1 -1
  152. package/docs/wiki/Variable.RXAP_ERROR_DIALOG_ERROR.md +1 -1
  153. package/docs/wiki/Variable.RXAP_ERROR_HANDLER_OPTIONS.md +1 -1
  154. package/docs/wiki/Variable.RXAP_ERROR_INTERCEPTOR_OPTIONS.md +1 -1
  155. package/docs/wiki/globals.md +1 -1
  156. package/fesm2022/rxap-ngx-error.mjs +75 -109
  157. package/fesm2022/rxap-ngx-error.mjs.map +1 -1
  158. package/package.json +42 -41
  159. package/types/rxap-ngx-error.d.ts +256 -0
  160. package/index.d.ts +0 -24
  161. package/lib/any-http-error/any-http-error-dialog-data.d.ts +0 -36
  162. package/lib/any-http-error/any-http-error.component.d.ts +0 -9
  163. package/lib/any-http-error/any-http-error.service.d.ts +0 -11
  164. package/lib/code-http-error/code-http-error-dialog-data.d.ts +0 -7
  165. package/lib/code-http-error/code-http-error.component.d.ts +0 -10
  166. package/lib/code-http-error/code-http-error.service.d.ts +0 -10
  167. package/lib/error/angular-error-dialog-data.d.ts +0 -8
  168. package/lib/error/angular-error.component.d.ts +0 -11
  169. package/lib/error/angular-error.service.d.ts +0 -10
  170. package/lib/error-capture-dialog.service.d.ts +0 -16
  171. package/lib/error-capture.service.d.ts +0 -12
  172. package/lib/error-dialog/error-dialog.component.d.ts +0 -20
  173. package/lib/error-handler.d.ts +0 -27
  174. package/lib/error-interceptor-options.d.ts +0 -7
  175. package/lib/http-error-interceptor.d.ts +0 -3
  176. package/lib/message-http-error/message-http-error-dialog-data.d.ts +0 -6
  177. package/lib/message-http-error/message-http-error.component.d.ts +0 -10
  178. package/lib/message-http-error/message-http-error.service.d.ts +0 -10
  179. package/lib/open-api-http-response-error/open-api-http-response-error-dialog-data.d.ts +0 -7
  180. package/lib/open-api-http-response-error/open-api-http-response-error.component.d.ts +0 -9
  181. package/lib/open-api-http-response-error/open-api-http-response-error.service.d.ts +0 -10
  182. package/lib/provide.d.ts +0 -10
  183. package/lib/tokens.d.ts +0 -11
  184. package/lib/utilities.d.ts +0 -19
@@ -0,0 +1,256 @@
1
+ import { OpenApiMetaData } from '@rxap/open-api';
2
+ import { HttpEventType, HttpErrorResponse, HttpRequest, HttpHandlerFn, HttpEvent } from '@angular/common/http';
3
+ import * as i0 from '@angular/core';
4
+ import { Signal, ElementRef, WritableSignal, ApplicationRef, InjectionToken, ErrorHandler, Provider, EnvironmentProviders } from '@angular/core';
5
+ import { ComponentPortal } from '@angular/cdk/portal';
6
+ import { ComponentType } from '@angular/cdk/overlay';
7
+ import { Observable } from 'rxjs';
8
+ import * as Sentry from '@sentry/angular';
9
+ import { Constructor } from '@rxap/utilities';
10
+
11
+ interface AnyHttpErrorDialogData {
12
+ method: string;
13
+ body?: any;
14
+ stack?: string;
15
+ error: any | null;
16
+ message: string;
17
+ name: string;
18
+ timestamp: number;
19
+ /**
20
+ * All response headers.
21
+ */
22
+ headers: Record<string, string[]>;
23
+ /**
24
+ * Response status code.
25
+ */
26
+ status: number;
27
+ /**
28
+ * Textual description of response status code, defaults to OK.
29
+ *
30
+ * Do not depend on this.
31
+ */
32
+ statusText: string;
33
+ /**
34
+ * URL of the resource retrieved, or null if not available.
35
+ */
36
+ url: string | null;
37
+ /**
38
+ * Whether the status code falls in the 2xx range.
39
+ */
40
+ ok: boolean;
41
+ /**
42
+ * Type of the response, narrowed to either the full response or the header.
43
+ */
44
+ type: HttpEventType.Response | HttpEventType.ResponseHeader;
45
+ }
46
+
47
+ interface OpenApiHttpResponseErrorDialogData extends AnyHttpErrorDialogData {
48
+ metadata: OpenApiMetaData;
49
+ operationId: string;
50
+ serverId?: string;
51
+ }
52
+
53
+ interface IErrorDialogComponent<Error = any> {
54
+ error: Error;
55
+ }
56
+ declare class ErrorDialogComponent {
57
+ readonly dialog: Signal<ElementRef<HTMLDialogElement>>;
58
+ readonly data: Signal<any[]>;
59
+ readonly activeIndex: i0.WritableSignal<number>;
60
+ readonly displayedButtons: Signal<number[]>;
61
+ readonly closeDialog: i0.OutputEmitterRef<void>;
62
+ private readonly component;
63
+ private readonly injector;
64
+ readonly componentPortal: Signal<ComponentPortal<IErrorDialogComponent<any>>>;
65
+ constructor();
66
+ close(): void;
67
+ static ɵfac: i0.ɵɵFactoryDeclaration<ErrorDialogComponent, never>;
68
+ static ɵcmp: i0.ɵɵComponentDeclaration<ErrorDialogComponent, "rxap-error-dialog", never, {}, { "closeDialog": "closeDialog"; }, never, never, true, never>;
69
+ }
70
+
71
+ declare class OpenApiHttpResponseErrorComponent implements IErrorDialogComponent<OpenApiHttpResponseErrorDialogData> {
72
+ readonly isProduction: boolean;
73
+ readonly error: OpenApiHttpResponseErrorDialogData;
74
+ static ɵfac: i0.ɵɵFactoryDeclaration<OpenApiHttpResponseErrorComponent, never>;
75
+ static ɵcmp: i0.ɵɵComponentDeclaration<OpenApiHttpResponseErrorComponent, "rxap-open-api-http-response-error", never, {}, {}, never, never, true, never>;
76
+ }
77
+
78
+ declare abstract class ErrorCaptureService<Error = any> {
79
+ protected abstract readonly component: ComponentType<IErrorDialogComponent>;
80
+ private readonly errorCaptureDialogService;
81
+ private errorList;
82
+ push(error: Error): void;
83
+ abstract compare(a: Error, b: Error): boolean;
84
+ static ɵfac: i0.ɵɵFactoryDeclaration<ErrorCaptureService<any>, never>;
85
+ static ɵprov: i0.ɵɵInjectableDeclaration<ErrorCaptureService<any>>;
86
+ }
87
+
88
+ declare class AnyHttpErrorService<Error extends AnyHttpErrorDialogData = AnyHttpErrorDialogData> extends ErrorCaptureService<Error> {
89
+ protected readonly component: ComponentType<IErrorDialogComponent>;
90
+ compare(a: Error, b: Error): boolean;
91
+ static ɵfac: i0.ɵɵFactoryDeclaration<AnyHttpErrorService<any>, never>;
92
+ static ɵprov: i0.ɵɵInjectableDeclaration<AnyHttpErrorService<any>>;
93
+ }
94
+
95
+ declare class OpenApiHttpResponseErrorService extends AnyHttpErrorService<OpenApiHttpResponseErrorDialogData> {
96
+ protected readonly component: typeof OpenApiHttpResponseErrorComponent;
97
+ compare(a: OpenApiHttpResponseErrorDialogData, b: OpenApiHttpResponseErrorDialogData): boolean;
98
+ static ɵfac: i0.ɵɵFactoryDeclaration<OpenApiHttpResponseErrorService, never>;
99
+ static ɵprov: i0.ɵɵInjectableDeclaration<OpenApiHttpResponseErrorService>;
100
+ }
101
+
102
+ interface MessageHttpErrorDialogData extends Omit<AnyHttpErrorDialogData, 'error'> {
103
+ error: {
104
+ message: string;
105
+ } & Record<string, unknown>;
106
+ }
107
+
108
+ declare class MessageHttpErrorComponent implements IErrorDialogComponent<MessageHttpErrorDialogData> {
109
+ readonly isProduction: boolean;
110
+ readonly error: MessageHttpErrorDialogData;
111
+ readonly showMore: i0.WritableSignal<boolean>;
112
+ static ɵfac: i0.ɵɵFactoryDeclaration<MessageHttpErrorComponent, never>;
113
+ static ɵcmp: i0.ɵɵComponentDeclaration<MessageHttpErrorComponent, "rxap-http-error-message", never, {}, {}, never, never, true, never>;
114
+ }
115
+
116
+ declare class MessageHttpErrorService extends AnyHttpErrorService<MessageHttpErrorDialogData> {
117
+ protected readonly component: typeof MessageHttpErrorComponent;
118
+ compare(a: MessageHttpErrorDialogData, b: MessageHttpErrorDialogData): boolean;
119
+ static ɵfac: i0.ɵɵFactoryDeclaration<MessageHttpErrorService, never>;
120
+ static ɵprov: i0.ɵɵInjectableDeclaration<MessageHttpErrorService>;
121
+ }
122
+
123
+ interface AngularErrorDialogData {
124
+ name?: string;
125
+ message: string;
126
+ stack?: string;
127
+ contexts: Record<string, Record<string, unknown>>;
128
+ extra: Record<string, unknown>;
129
+ tags: Record<string, string>;
130
+ }
131
+
132
+ declare class AngularErrorComponent implements IErrorDialogComponent<AngularErrorDialogData> {
133
+ readonly error: AngularErrorDialogData;
134
+ get hasTags(): boolean;
135
+ get hasContexts(): boolean;
136
+ get hasExtra(): boolean;
137
+ static ɵfac: i0.ɵɵFactoryDeclaration<AngularErrorComponent, never>;
138
+ static ɵcmp: i0.ɵɵComponentDeclaration<AngularErrorComponent, "rxap-angular-error", never, {}, {}, never, never, true, never>;
139
+ }
140
+
141
+ declare class AngularErrorService extends ErrorCaptureService<AngularErrorDialogData> {
142
+ protected readonly component: typeof AngularErrorComponent;
143
+ compare(a: AngularErrorDialogData, b: AngularErrorDialogData): boolean;
144
+ static ɵfac: i0.ɵɵFactoryDeclaration<AngularErrorService, never>;
145
+ static ɵprov: i0.ɵɵInjectableDeclaration<AngularErrorService>;
146
+ }
147
+
148
+ interface CodeHttpErrorDialogData extends Omit<AnyHttpErrorDialogData, 'error'> {
149
+ errorCode: string | number;
150
+ error: {
151
+ message?: string;
152
+ } & Record<string, unknown>;
153
+ }
154
+
155
+ declare class CodeHttpErrorComponent implements IErrorDialogComponent<CodeHttpErrorDialogData> {
156
+ readonly isProduction: boolean;
157
+ readonly error: CodeHttpErrorDialogData;
158
+ readonly showMore: i0.WritableSignal<boolean>;
159
+ static ɵfac: i0.ɵɵFactoryDeclaration<CodeHttpErrorComponent, never>;
160
+ static ɵcmp: i0.ɵɵComponentDeclaration<CodeHttpErrorComponent, "rxap-http-error-message", never, {}, {}, never, never, true, never>;
161
+ }
162
+
163
+ declare class CodeHttpErrorService extends AnyHttpErrorService<CodeHttpErrorDialogData> {
164
+ protected readonly component: typeof CodeHttpErrorComponent;
165
+ compare(a: CodeHttpErrorDialogData, b: CodeHttpErrorDialogData): boolean;
166
+ static ɵfac: i0.ɵɵFactoryDeclaration<CodeHttpErrorService, never>;
167
+ static ɵprov: i0.ɵɵInjectableDeclaration<CodeHttpErrorService>;
168
+ }
169
+
170
+ declare class AnyHttpErrorComponent implements IErrorDialogComponent<AnyHttpErrorDialogData> {
171
+ readonly isProduction: boolean;
172
+ readonly error: AnyHttpErrorDialogData;
173
+ static ɵfac: i0.ɵɵFactoryDeclaration<AnyHttpErrorComponent, never>;
174
+ static ɵcmp: i0.ɵɵComponentDeclaration<AnyHttpErrorComponent, "rxap-any-http-error", never, {}, {}, never, never, true, never>;
175
+ }
176
+
177
+ interface IErrorCaptureDialogService<Error = any> {
178
+ open(component: ComponentType<IErrorDialogComponent>, errorList: WritableSignal<Error[]>): Observable<void>;
179
+ }
180
+ declare class ErrorCaptureDialogService<Error = any> implements IErrorCaptureDialogService<Error> {
181
+ protected readonly applicationRef: ApplicationRef;
182
+ protected readonly document: Document;
183
+ protected readonly disabled: boolean;
184
+ open(component: ComponentType<IErrorDialogComponent>, errorList: WritableSignal<Error[]>): Observable<void>;
185
+ static ɵfac: i0.ɵɵFactoryDeclaration<ErrorCaptureDialogService<any>, never>;
186
+ static ɵprov: i0.ɵɵInjectableDeclaration<ErrorCaptureDialogService<any>>;
187
+ }
188
+
189
+ interface ErrorHandlerOptions {
190
+ logErrors?: boolean;
191
+ showDialog?: boolean;
192
+ sentry?: {
193
+ showDialog?: boolean;
194
+ dialogOptions?: Sentry.ReportDialogOptions;
195
+ };
196
+ }
197
+ declare const RXAP_ERROR_HANDLER_OPTIONS: InjectionToken<ErrorHandlerOptions>;
198
+ declare class RxapErrorHandler implements ErrorHandler {
199
+ protected readonly options: ErrorHandlerOptions;
200
+ protected readonly injector: i0.Injector;
201
+ private isLoadChunkError;
202
+ /**
203
+ * Method called for every value captured through the ErrorHandler
204
+ */
205
+ handleError(errorCandidate: unknown): void;
206
+ protected showOpenApiHttpResponseErrorDialog(data: OpenApiHttpResponseErrorDialogData): void;
207
+ protected showAngularErrorDialog(data: AngularErrorDialogData): void;
208
+ static ɵfac: i0.ɵɵFactoryDeclaration<RxapErrorHandler, never>;
209
+ static ɵprov: i0.ɵɵInjectableDeclaration<RxapErrorHandler>;
210
+ }
211
+
212
+ declare function DefaultErrorCodeExtractor(error: HttpErrorResponse): number | string | null;
213
+ declare function DefaultErrorFilter(error: HttpErrorResponse): boolean;
214
+ interface ErrorInterceptorOptions {
215
+ extractErrorCode?: (error: HttpErrorResponse) => number | string | null;
216
+ filter?: Array<(error: HttpErrorResponse) => boolean>;
217
+ }
218
+
219
+ declare function HttpErrorInterceptor(req: HttpRequest<unknown>, next: HttpHandlerFn): Observable<HttpEvent<unknown>>;
220
+
221
+ declare function provideAutoErrorInterception(...providers: Array<Provider | EnvironmentProviders>): (Provider | EnvironmentProviders)[];
222
+ declare function withErrorCaptureDialogService(service: Constructor<IErrorCaptureDialogService>): Provider;
223
+ declare function withErrorCaptureDialogDisabledIf(condition: boolean | (() => boolean)): Provider;
224
+ /**
225
+ * @deprecated Use `provideAutoErrorInterception` instead.
226
+ */
227
+ declare function ProvideErrorHandler(): Array<Provider | EnvironmentProviders>;
228
+
229
+ declare const RXAP_ERROR_DIALOG_DATA: InjectionToken<Signal<any[]>>;
230
+ declare const RXAP_ERROR_DIALOG_ERROR: InjectionToken<any>;
231
+ declare const RXAP_ERROR_DIALOG_COMPONENT: InjectionToken<ComponentType<IErrorDialogComponent<any>>>;
232
+ declare const RXAP_ERROR_INTERCEPTOR_OPTIONS: InjectionToken<ErrorInterceptorOptions>;
233
+ declare const RXAP_ERROR_CAPTURE_DIALOG_SERVICE: InjectionToken<IErrorCaptureDialogService<any>>;
234
+ declare const RXAP_ERROR_DIALOG_DISABLED: InjectionToken<boolean>;
235
+
236
+ interface SimplifiedHttpErrorResponse extends Record<string, unknown> {
237
+ url: string | null;
238
+ message: string;
239
+ name: string;
240
+ status: number;
241
+ statusText: string;
242
+ headers: Record<string, string[]>;
243
+ error: any;
244
+ errorMessage: string;
245
+ ok: boolean;
246
+ type: HttpEventType.Response | HttpEventType.ResponseHeader;
247
+ }
248
+ declare function SimplifyHttpErrorResponse(event: HttpErrorResponse): SimplifiedHttpErrorResponse;
249
+ declare function ExtractContextFromError(error: unknown): Record<string, Record<string, unknown>>;
250
+ declare function ExtractExtraFromError(error: unknown): {};
251
+ declare function ExtractTagsFromError(error: unknown): {};
252
+ declare function ExtractError(error: unknown): string | HttpErrorResponse | Error;
253
+ declare function PrintError(errorCandidate: unknown): void;
254
+
255
+ export { AngularErrorComponent, AngularErrorService, AnyHttpErrorComponent, AnyHttpErrorService, CodeHttpErrorComponent, CodeHttpErrorService, DefaultErrorCodeExtractor, DefaultErrorFilter, ErrorCaptureDialogService, ErrorCaptureService, ErrorDialogComponent, ExtractContextFromError, ExtractError, ExtractExtraFromError, ExtractTagsFromError, HttpErrorInterceptor, MessageHttpErrorComponent, MessageHttpErrorService, OpenApiHttpResponseErrorComponent, OpenApiHttpResponseErrorService, PrintError, ProvideErrorHandler, RXAP_ERROR_CAPTURE_DIALOG_SERVICE, RXAP_ERROR_DIALOG_COMPONENT, RXAP_ERROR_DIALOG_DATA, RXAP_ERROR_DIALOG_DISABLED, RXAP_ERROR_DIALOG_ERROR, RXAP_ERROR_HANDLER_OPTIONS, RXAP_ERROR_INTERCEPTOR_OPTIONS, RxapErrorHandler, SimplifyHttpErrorResponse, provideAutoErrorInterception, withErrorCaptureDialogDisabledIf, withErrorCaptureDialogService };
256
+ export type { AngularErrorDialogData, AnyHttpErrorDialogData, CodeHttpErrorDialogData, ErrorHandlerOptions, ErrorInterceptorOptions, IErrorCaptureDialogService, IErrorDialogComponent, MessageHttpErrorDialogData, OpenApiHttpResponseErrorDialogData, SimplifiedHttpErrorResponse };
package/index.d.ts DELETED
@@ -1,24 +0,0 @@
1
- export * from './lib/open-api-http-response-error/open-api-http-response-error-dialog-data';
2
- export * from './lib/open-api-http-response-error/open-api-http-response-error.component';
3
- export * from './lib/open-api-http-response-error/open-api-http-response-error.service';
4
- export * from './lib/message-http-error/message-http-error-dialog-data';
5
- export * from './lib/message-http-error/message-http-error.component';
6
- export * from './lib/message-http-error/message-http-error.service';
7
- export * from './lib/error-dialog/error-dialog.component';
8
- export * from './lib/error/angular-error-dialog-data';
9
- export * from './lib/error/angular-error.component';
10
- export * from './lib/error/angular-error.service';
11
- export * from './lib/code-http-error/code-http-error-dialog-data';
12
- export * from './lib/code-http-error/code-http-error.component';
13
- export * from './lib/code-http-error/code-http-error.service';
14
- export * from './lib/any-http-error/any-http-error-dialog-data';
15
- export * from './lib/any-http-error/any-http-error.component';
16
- export * from './lib/any-http-error/any-http-error.service';
17
- export * from './lib/error-capture-dialog.service';
18
- export * from './lib/error-capture.service';
19
- export * from './lib/error-handler';
20
- export * from './lib/error-interceptor-options';
21
- export * from './lib/http-error-interceptor';
22
- export * from './lib/provide';
23
- export * from './lib/tokens';
24
- export * from './lib/utilities';
@@ -1,36 +0,0 @@
1
- import { HttpEventType } from '@angular/common/http';
2
- export interface AnyHttpErrorDialogData {
3
- method: string;
4
- body?: any;
5
- stack?: string;
6
- error: any | null;
7
- message: string;
8
- name: string;
9
- timestamp: number;
10
- /**
11
- * All response headers.
12
- */
13
- headers: Record<string, string[]>;
14
- /**
15
- * Response status code.
16
- */
17
- status: number;
18
- /**
19
- * Textual description of response status code, defaults to OK.
20
- *
21
- * Do not depend on this.
22
- */
23
- statusText: string;
24
- /**
25
- * URL of the resource retrieved, or null if not available.
26
- */
27
- url: string | null;
28
- /**
29
- * Whether the status code falls in the 2xx range.
30
- */
31
- ok: boolean;
32
- /**
33
- * Type of the response, narrowed to either the full response or the header.
34
- */
35
- type: HttpEventType.Response | HttpEventType.ResponseHeader;
36
- }
@@ -1,9 +0,0 @@
1
- import { IErrorDialogComponent } from '../error-dialog/error-dialog.component';
2
- import { AnyHttpErrorDialogData } from './any-http-error-dialog-data';
3
- import * as i0 from "@angular/core";
4
- export declare class AnyHttpErrorComponent implements IErrorDialogComponent<AnyHttpErrorDialogData> {
5
- readonly isProduction: boolean;
6
- readonly error: AnyHttpErrorDialogData;
7
- static ɵfac: i0.ɵɵFactoryDeclaration<AnyHttpErrorComponent, never>;
8
- static ɵcmp: i0.ɵɵComponentDeclaration<AnyHttpErrorComponent, "rxap-any-http-error", never, {}, {}, never, never, true, never>;
9
- }
@@ -1,11 +0,0 @@
1
- import { ComponentType } from '@angular/cdk/overlay';
2
- import { ErrorCaptureService } from '../error-capture.service';
3
- import { IErrorDialogComponent } from '../error-dialog/error-dialog.component';
4
- import { AnyHttpErrorDialogData } from './any-http-error-dialog-data';
5
- import * as i0 from "@angular/core";
6
- export declare class AnyHttpErrorService<Error extends AnyHttpErrorDialogData = AnyHttpErrorDialogData> extends ErrorCaptureService<Error> {
7
- protected readonly component: ComponentType<IErrorDialogComponent>;
8
- compare(a: Error, b: Error): boolean;
9
- static ɵfac: i0.ɵɵFactoryDeclaration<AnyHttpErrorService<any>, never>;
10
- static ɵprov: i0.ɵɵInjectableDeclaration<AnyHttpErrorService<any>>;
11
- }
@@ -1,7 +0,0 @@
1
- import { AnyHttpErrorDialogData } from '../any-http-error/any-http-error-dialog-data';
2
- export interface CodeHttpErrorDialogData extends Omit<AnyHttpErrorDialogData, 'error'> {
3
- errorCode: string | number;
4
- error: {
5
- message?: string;
6
- } & Record<string, unknown>;
7
- }
@@ -1,10 +0,0 @@
1
- import { IErrorDialogComponent } from '../error-dialog/error-dialog.component';
2
- import { CodeHttpErrorDialogData } from './code-http-error-dialog-data';
3
- import * as i0 from "@angular/core";
4
- export declare class CodeHttpErrorComponent implements IErrorDialogComponent<CodeHttpErrorDialogData> {
5
- readonly isProduction: boolean;
6
- readonly error: CodeHttpErrorDialogData;
7
- readonly showMore: import("@angular/core").WritableSignal<boolean>;
8
- static ɵfac: i0.ɵɵFactoryDeclaration<CodeHttpErrorComponent, never>;
9
- static ɵcmp: i0.ɵɵComponentDeclaration<CodeHttpErrorComponent, "rxap-http-error-message", never, {}, {}, never, never, true, never>;
10
- }
@@ -1,10 +0,0 @@
1
- import { AnyHttpErrorService } from '../any-http-error/any-http-error.service';
2
- import { CodeHttpErrorDialogData } from './code-http-error-dialog-data';
3
- import { CodeHttpErrorComponent } from './code-http-error.component';
4
- import * as i0 from "@angular/core";
5
- export declare class CodeHttpErrorService extends AnyHttpErrorService<CodeHttpErrorDialogData> {
6
- protected readonly component: typeof CodeHttpErrorComponent;
7
- compare(a: CodeHttpErrorDialogData, b: CodeHttpErrorDialogData): boolean;
8
- static ɵfac: i0.ɵɵFactoryDeclaration<CodeHttpErrorService, never>;
9
- static ɵprov: i0.ɵɵInjectableDeclaration<CodeHttpErrorService>;
10
- }
@@ -1,8 +0,0 @@
1
- export interface AngularErrorDialogData {
2
- name?: string;
3
- message: string;
4
- stack?: string;
5
- contexts: Record<string, Record<string, unknown>>;
6
- extra: Record<string, unknown>;
7
- tags: Record<string, string>;
8
- }
@@ -1,11 +0,0 @@
1
- import { IErrorDialogComponent } from '../error-dialog/error-dialog.component';
2
- import { AngularErrorDialogData } from './angular-error-dialog-data';
3
- import * as i0 from "@angular/core";
4
- export declare class AngularErrorComponent implements IErrorDialogComponent<AngularErrorDialogData> {
5
- readonly error: AngularErrorDialogData;
6
- get hasTags(): boolean;
7
- get hasContexts(): boolean;
8
- get hasExtra(): boolean;
9
- static ɵfac: i0.ɵɵFactoryDeclaration<AngularErrorComponent, never>;
10
- static ɵcmp: i0.ɵɵComponentDeclaration<AngularErrorComponent, "rxap-angular-error", never, {}, {}, never, never, true, never>;
11
- }
@@ -1,10 +0,0 @@
1
- import { ErrorCaptureService } from '../error-capture.service';
2
- import { AngularErrorDialogData } from './angular-error-dialog-data';
3
- import { AngularErrorComponent } from './angular-error.component';
4
- import * as i0 from "@angular/core";
5
- export declare class AngularErrorService extends ErrorCaptureService<AngularErrorDialogData> {
6
- protected readonly component: typeof AngularErrorComponent;
7
- compare(a: AngularErrorDialogData, b: AngularErrorDialogData): boolean;
8
- static ɵfac: i0.ɵɵFactoryDeclaration<AngularErrorService, never>;
9
- static ɵprov: i0.ɵɵInjectableDeclaration<AngularErrorService>;
10
- }
@@ -1,16 +0,0 @@
1
- import { ComponentType } from '@angular/cdk/overlay';
2
- import { ApplicationRef, WritableSignal } from '@angular/core';
3
- import { Observable } from 'rxjs';
4
- import { IErrorDialogComponent } from './error-dialog/error-dialog.component';
5
- import * as i0 from "@angular/core";
6
- export interface IErrorCaptureDialogService<Error = any> {
7
- open(component: ComponentType<IErrorDialogComponent>, errorList: WritableSignal<Error[]>): Observable<void>;
8
- }
9
- export declare class ErrorCaptureDialogService<Error = any> implements IErrorCaptureDialogService<Error> {
10
- protected readonly applicationRef: ApplicationRef;
11
- protected readonly document: Document;
12
- protected readonly disabled: boolean;
13
- open(component: ComponentType<IErrorDialogComponent>, errorList: WritableSignal<Error[]>): Observable<void>;
14
- static ɵfac: i0.ɵɵFactoryDeclaration<ErrorCaptureDialogService<any>, never>;
15
- static ɵprov: i0.ɵɵInjectableDeclaration<ErrorCaptureDialogService<any>>;
16
- }
@@ -1,12 +0,0 @@
1
- import { ComponentType } from '@angular/cdk/overlay';
2
- import { IErrorDialogComponent } from './error-dialog/error-dialog.component';
3
- import * as i0 from "@angular/core";
4
- export declare abstract class ErrorCaptureService<Error = any> {
5
- protected abstract readonly component: ComponentType<IErrorDialogComponent>;
6
- private readonly errorCaptureDialogService;
7
- private errorList;
8
- push(error: Error): void;
9
- abstract compare(a: Error, b: Error): boolean;
10
- static ɵfac: i0.ɵɵFactoryDeclaration<ErrorCaptureService<any>, never>;
11
- static ɵprov: i0.ɵɵInjectableDeclaration<ErrorCaptureService<any>>;
12
- }
@@ -1,20 +0,0 @@
1
- import { ComponentPortal } from '@angular/cdk/portal';
2
- import { AfterViewInit, ElementRef, EventEmitter, Signal } from '@angular/core';
3
- import * as i0 from "@angular/core";
4
- export interface IErrorDialogComponent<Error = any> {
5
- error: Error;
6
- }
7
- export declare class ErrorDialogComponent implements AfterViewInit {
8
- dialog: ElementRef<HTMLDialogElement>;
9
- readonly data: Signal<any[]>;
10
- readonly activeIndex: import("@angular/core").WritableSignal<number>;
11
- readonly displayedButtons: Signal<number[]>;
12
- closeDialog: EventEmitter<void>;
13
- private readonly component;
14
- private readonly injector;
15
- readonly componentPortal: Signal<ComponentPortal<IErrorDialogComponent<any>>>;
16
- ngAfterViewInit(): void;
17
- close(): void;
18
- static ɵfac: i0.ɵɵFactoryDeclaration<ErrorDialogComponent, never>;
19
- static ɵcmp: i0.ɵɵComponentDeclaration<ErrorDialogComponent, "rxap-error-dialog", never, {}, { "closeDialog": "closeDialog"; }, never, never, true, never>;
20
- }
@@ -1,27 +0,0 @@
1
- import { ErrorHandler, InjectionToken } from '@angular/core';
2
- import * as Sentry from '@sentry/angular';
3
- import { AngularErrorDialogData } from './error/angular-error-dialog-data';
4
- import { OpenApiHttpResponseErrorDialogData } from './open-api-http-response-error/open-api-http-response-error-dialog-data';
5
- import * as i0 from "@angular/core";
6
- export interface ErrorHandlerOptions {
7
- logErrors?: boolean;
8
- showDialog?: boolean;
9
- sentry?: {
10
- showDialog?: boolean;
11
- dialogOptions?: Sentry.ReportDialogOptions;
12
- };
13
- }
14
- export declare const RXAP_ERROR_HANDLER_OPTIONS: InjectionToken<ErrorHandlerOptions>;
15
- export declare class RxapErrorHandler implements ErrorHandler {
16
- protected readonly options: ErrorHandlerOptions;
17
- protected readonly injector: import("@angular/core").Injector;
18
- private isLoadChunkError;
19
- /**
20
- * Method called for every value captured through the ErrorHandler
21
- */
22
- handleError(errorCandidate: unknown): void;
23
- protected showOpenApiHttpResponseErrorDialog(data: OpenApiHttpResponseErrorDialogData): void;
24
- protected showAngularErrorDialog(data: AngularErrorDialogData): void;
25
- static ɵfac: i0.ɵɵFactoryDeclaration<RxapErrorHandler, never>;
26
- static ɵprov: i0.ɵɵInjectableDeclaration<RxapErrorHandler>;
27
- }
@@ -1,7 +0,0 @@
1
- import { HttpErrorResponse } from '@angular/common/http';
2
- export declare function DefaultErrorCodeExtractor(error: HttpErrorResponse): number | string | null;
3
- export declare function DefaultErrorFilter(error: HttpErrorResponse): boolean;
4
- export interface ErrorInterceptorOptions {
5
- extractErrorCode?: (error: HttpErrorResponse) => number | string | null;
6
- filter?: Array<(error: HttpErrorResponse) => boolean>;
7
- }
@@ -1,3 +0,0 @@
1
- import { HttpEvent, HttpHandlerFn, HttpRequest } from '@angular/common/http';
2
- import { Observable } from 'rxjs';
3
- export declare function HttpErrorInterceptor(req: HttpRequest<unknown>, next: HttpHandlerFn): Observable<HttpEvent<unknown>>;
@@ -1,6 +0,0 @@
1
- import { AnyHttpErrorDialogData } from '../any-http-error/any-http-error-dialog-data';
2
- export interface MessageHttpErrorDialogData extends Omit<AnyHttpErrorDialogData, 'error'> {
3
- error: {
4
- message: string;
5
- } & Record<string, unknown>;
6
- }
@@ -1,10 +0,0 @@
1
- import { IErrorDialogComponent } from '../error-dialog/error-dialog.component';
2
- import { MessageHttpErrorDialogData } from './message-http-error-dialog-data';
3
- import * as i0 from "@angular/core";
4
- export declare class MessageHttpErrorComponent implements IErrorDialogComponent<MessageHttpErrorDialogData> {
5
- readonly isProduction: boolean;
6
- readonly error: MessageHttpErrorDialogData;
7
- readonly showMore: import("@angular/core").WritableSignal<boolean>;
8
- static ɵfac: i0.ɵɵFactoryDeclaration<MessageHttpErrorComponent, never>;
9
- static ɵcmp: i0.ɵɵComponentDeclaration<MessageHttpErrorComponent, "rxap-http-error-message", never, {}, {}, never, never, true, never>;
10
- }
@@ -1,10 +0,0 @@
1
- import { AnyHttpErrorService } from '../any-http-error/any-http-error.service';
2
- import { MessageHttpErrorDialogData } from './message-http-error-dialog-data';
3
- import { MessageHttpErrorComponent } from './message-http-error.component';
4
- import * as i0 from "@angular/core";
5
- export declare class MessageHttpErrorService extends AnyHttpErrorService<MessageHttpErrorDialogData> {
6
- protected readonly component: typeof MessageHttpErrorComponent;
7
- compare(a: MessageHttpErrorDialogData, b: MessageHttpErrorDialogData): boolean;
8
- static ɵfac: i0.ɵɵFactoryDeclaration<MessageHttpErrorService, never>;
9
- static ɵprov: i0.ɵɵInjectableDeclaration<MessageHttpErrorService>;
10
- }
@@ -1,7 +0,0 @@
1
- import { OpenApiMetaData } from '@rxap/open-api';
2
- import { AnyHttpErrorDialogData } from '../any-http-error/any-http-error-dialog-data';
3
- export interface OpenApiHttpResponseErrorDialogData extends AnyHttpErrorDialogData {
4
- metadata: OpenApiMetaData;
5
- operationId: string;
6
- serverId?: string;
7
- }
@@ -1,9 +0,0 @@
1
- import { IErrorDialogComponent } from '../error-dialog/error-dialog.component';
2
- import { OpenApiHttpResponseErrorDialogData } from './open-api-http-response-error-dialog-data';
3
- import * as i0 from "@angular/core";
4
- export declare class OpenApiHttpResponseErrorComponent implements IErrorDialogComponent<OpenApiHttpResponseErrorDialogData> {
5
- readonly isProduction: boolean;
6
- readonly error: OpenApiHttpResponseErrorDialogData;
7
- static ɵfac: i0.ɵɵFactoryDeclaration<OpenApiHttpResponseErrorComponent, never>;
8
- static ɵcmp: i0.ɵɵComponentDeclaration<OpenApiHttpResponseErrorComponent, "rxap-open-api-http-response-error", never, {}, {}, never, never, true, never>;
9
- }
@@ -1,10 +0,0 @@
1
- import { AnyHttpErrorService } from '../any-http-error/any-http-error.service';
2
- import { OpenApiHttpResponseErrorDialogData } from './open-api-http-response-error-dialog-data';
3
- import { OpenApiHttpResponseErrorComponent } from './open-api-http-response-error.component';
4
- import * as i0 from "@angular/core";
5
- export declare class OpenApiHttpResponseErrorService extends AnyHttpErrorService<OpenApiHttpResponseErrorDialogData> {
6
- protected readonly component: typeof OpenApiHttpResponseErrorComponent;
7
- compare(a: OpenApiHttpResponseErrorDialogData, b: OpenApiHttpResponseErrorDialogData): boolean;
8
- static ɵfac: i0.ɵɵFactoryDeclaration<OpenApiHttpResponseErrorService, never>;
9
- static ɵprov: i0.ɵɵInjectableDeclaration<OpenApiHttpResponseErrorService>;
10
- }
package/lib/provide.d.ts DELETED
@@ -1,10 +0,0 @@
1
- import { EnvironmentProviders, Provider } from '@angular/core';
2
- import { Constructor } from '@rxap/utilities';
3
- import { IErrorCaptureDialogService } from './error-capture-dialog.service';
4
- export declare function provideAutoErrorInterception(...providers: Array<Provider | EnvironmentProviders>): (Provider | EnvironmentProviders)[];
5
- export declare function withErrorCaptureDialogService(service: Constructor<IErrorCaptureDialogService>): Provider;
6
- export declare function withErrorCaptureDialogDisabledIf(condition: boolean | (() => boolean)): Provider;
7
- /**
8
- * @deprecated Use `provideAutoErrorInterception` instead.
9
- */
10
- export declare function ProvideErrorHandler(): Array<Provider | EnvironmentProviders>;
package/lib/tokens.d.ts DELETED
@@ -1,11 +0,0 @@
1
- import { ComponentType } from '@angular/cdk/overlay';
2
- import { InjectionToken, Signal } from '@angular/core';
3
- import { IErrorCaptureDialogService } from './error-capture-dialog.service';
4
- import { IErrorDialogComponent } from './error-dialog/error-dialog.component';
5
- import { ErrorInterceptorOptions } from './error-interceptor-options';
6
- export declare const RXAP_ERROR_DIALOG_DATA: InjectionToken<Signal<any[]>>;
7
- export declare const RXAP_ERROR_DIALOG_ERROR: InjectionToken<any>;
8
- export declare const RXAP_ERROR_DIALOG_COMPONENT: InjectionToken<ComponentType<IErrorDialogComponent<any>>>;
9
- export declare const RXAP_ERROR_INTERCEPTOR_OPTIONS: InjectionToken<ErrorInterceptorOptions>;
10
- export declare const RXAP_ERROR_CAPTURE_DIALOG_SERVICE: InjectionToken<IErrorCaptureDialogService<any>>;
11
- export declare const RXAP_ERROR_DIALOG_DISABLED: InjectionToken<boolean>;
@@ -1,19 +0,0 @@
1
- import { HttpErrorResponse, HttpEventType } from '@angular/common/http';
2
- export interface SimplifiedHttpErrorResponse extends Record<string, unknown> {
3
- url: string | null;
4
- message: string;
5
- name: string;
6
- status: number;
7
- statusText: string;
8
- headers: Record<string, string[]>;
9
- error: any;
10
- errorMessage: string;
11
- ok: boolean;
12
- type: HttpEventType.Response | HttpEventType.ResponseHeader;
13
- }
14
- export declare function SimplifyHttpErrorResponse(event: HttpErrorResponse): SimplifiedHttpErrorResponse;
15
- export declare function ExtractContextFromError(error: unknown): Record<string, Record<string, unknown>>;
16
- export declare function ExtractExtraFromError(error: unknown): {};
17
- export declare function ExtractTagsFromError(error: unknown): {};
18
- export declare function ExtractError(error: unknown): string | HttpErrorResponse | Error;
19
- export declare function PrintError(errorCandidate: unknown): void;