Amplify JS API Documentation
    Preparing search index...

    Variable isCancelErrorConst

    isCancelError: (error: unknown) => error is CanceledError

    Check if an error is caused by user calling cancel() in REST API.

    Type Declaration

      • (error: unknown): error is CanceledError
      • Parameters

        • error: unknown

          The unknown exception to be checked.

        Returns error is CanceledError

        • A boolean indicating if the error was from an upload cancellation

    This function works ONLY for errors thrown by REST API. For GraphQL APIs, use client.isCancelError(error) instead. client is generated from generateClient() API from aws-amplify/api.