@magda/utils 2.0.0-alpha.4 → 2.0.0-alpha.7
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.
- package/dist/index-web.d.ts +11 -1
- package/dist/index-web.js +658 -651
- package/dist/index.d.ts +11 -1
- package/dist/index.js +753 -746
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -186,6 +186,16 @@ export declare function retryBackoff<T>(op: () => Promise<T>, delaySeconds: numb
|
|
|
186
186
|
|
|
187
187
|
export declare function runLater<TResult>(milliseconds: number, functionToRunLater: () => Promise<TResult> | TResult): Promise<TResult>;
|
|
188
188
|
|
|
189
|
+
declare class ServerError extends Error {
|
|
190
|
+
statusCode: number;
|
|
191
|
+
constructor(message?: string, statusCode?: number);
|
|
192
|
+
toData(): {
|
|
193
|
+
isError: boolean;
|
|
194
|
+
errorCode: number;
|
|
195
|
+
errorMessage: string;
|
|
196
|
+
};
|
|
197
|
+
}
|
|
198
|
+
|
|
189
199
|
export declare class ServiceError extends Error {
|
|
190
200
|
e: any;
|
|
191
201
|
constructor(message: string, e: any);
|
|
@@ -193,6 +203,6 @@ export declare class ServiceError extends Error {
|
|
|
193
203
|
|
|
194
204
|
export declare function setDefaultRequestInitOptions(options: RequestInit): void;
|
|
195
205
|
|
|
196
|
-
export declare function unionToThrowable<T>(input: T | Error): T;
|
|
206
|
+
export declare function unionToThrowable<T>(input: T | Error | ServerError): T;
|
|
197
207
|
|
|
198
208
|
export { }
|