@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-web.d.ts
CHANGED
|
@@ -178,6 +178,16 @@ export declare function retryBackoff<T>(op: () => Promise<T>, delaySeconds: numb
|
|
|
178
178
|
|
|
179
179
|
export declare function runLater<TResult>(milliseconds: number, functionToRunLater: () => Promise<TResult> | TResult): Promise<TResult>;
|
|
180
180
|
|
|
181
|
+
declare class ServerError extends Error {
|
|
182
|
+
statusCode: number;
|
|
183
|
+
constructor(message?: string, statusCode?: number);
|
|
184
|
+
toData(): {
|
|
185
|
+
isError: boolean;
|
|
186
|
+
errorCode: number;
|
|
187
|
+
errorMessage: string;
|
|
188
|
+
};
|
|
189
|
+
}
|
|
190
|
+
|
|
181
191
|
export declare class ServiceError extends Error {
|
|
182
192
|
e: any;
|
|
183
193
|
constructor(message: string, e: any);
|
|
@@ -185,6 +195,6 @@ export declare class ServiceError extends Error {
|
|
|
185
195
|
|
|
186
196
|
export declare function setDefaultRequestInitOptions(options: RequestInit): void;
|
|
187
197
|
|
|
188
|
-
export declare function unionToThrowable<T>(input: T | Error): T;
|
|
198
|
+
export declare function unionToThrowable<T>(input: T | Error | ServerError): T;
|
|
189
199
|
|
|
190
200
|
export { }
|