UNPKG

684 BTypeScriptView Raw
1import { AmplifyErrorParams } from '@aws-amplify/core/internals/utils';
2import { StorageError } from './StorageError';
3/**
4 * Internal-only class for CanceledError thrown by XHR handler or multipart upload when cancellation is invoked
5 * without overwriting behavior.
6 *
7 * @internal
8 */
9export declare class CanceledError extends StorageError {
10 constructor(params?: Partial<AmplifyErrorParams>);
11}
12/**
13 * Check if an error is caused by user calling `cancel()` on a upload/download task. If an overwriting error is
14 * supplied to `task.cancel(errorOverwrite)`, this function will return `false`.
15 */
16export declare const isCancelError: (error: unknown) => error is CanceledError;