@azure-net/kit 1.4.2 → 1.4.31
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.
|
@@ -11,9 +11,9 @@ export interface AppError<T = unknown, CustomErrorField = never> {
|
|
|
11
11
|
retry?: () => unknown;
|
|
12
12
|
}
|
|
13
13
|
export type ErrorType<T = unknown> = Error | HttpServiceError<T> | SchemaFail<T>;
|
|
14
|
-
export declare const baseParseHttpError: <T = unknown, D = never>(error: HttpServiceError<T>, retry?: () => unknown) => Promise<AppError<T, D>>;
|
|
15
|
-
export declare const baseParseSchemaError: <SchemaData = unknown, D = never>(error: SchemaFail<SchemaData>, retry?: () => unknown) => Promise<AppError<SchemaData, D>>;
|
|
16
|
-
export declare const baseParseBaseError: <D = never>(error: Error, retry?: () => unknown) => Promise<AppError<never, D>>;
|
|
14
|
+
export declare const baseParseHttpError: <T = unknown, D = never>(error: HttpServiceError<T>, retry?: () => unknown | Promise<unknown>) => Promise<AppError<T, D>>;
|
|
15
|
+
export declare const baseParseSchemaError: <SchemaData = unknown, D = never>(error: SchemaFail<SchemaData>, retry?: () => unknown | Promise<unknown>) => Promise<AppError<SchemaData, D>>;
|
|
16
|
+
export declare const baseParseBaseError: <D = never>(error: Error, retry?: () => unknown | Promise<unknown>) => Promise<AppError<never, D>>;
|
|
17
17
|
export declare const createErrorParser: <BaseError = unknown, Custom = unknown>(parsers?: {
|
|
18
18
|
parseBaseError?: typeof baseParseBaseError<Custom>;
|
|
19
19
|
parseHttpError?: typeof baseParseHttpError<BaseError, Custom>;
|