RTCForge API Reference v1.1.1
    Preparing search index...

    Variable FileTransferErrorCodeConst

    FileTransferErrorCode: {
        Cancelled: "FT_CANCELLED";
        ChannelClosed: "FT_CHANNEL_CLOSED";
        ChecksumMismatch: "FT_CHECKSUM_MISMATCH";
        InvalidFrame: "FT_INVALID_FRAME";
        InvalidState: "FT_INVALID_STATE";
        OfferRejected: "FT_OFFER_REJECTED";
        SinkWriteFailed: "FT_SINK_WRITE_FAILED";
        SourceReadFailed: "FT_SOURCE_READ_FAILED";
        Timeout: "FT_TIMEOUT";
    } = ...

    Machine-readable error codes carried by FileTransferError.

    Each code identifies a distinct failure mode in the file-transfer pipeline, allowing callers to branch on error.code rather than parsing messages.

    Type Declaration

    • ReadonlyCancelled: "FT_CANCELLED"

      The transfer was cancelled locally or by the remote peer (ft-cancel).

    • ReadonlyChannelClosed: "FT_CHANNEL_CLOSED"

      A required data or control channel closed before the transfer finished.

    • ReadonlyChecksumMismatch: "FT_CHECKSUM_MISMATCH"

      The receiver's computed SHA-256 digest did not match the sender's, so the received data is corrupt.

    • ReadonlyInvalidFrame: "FT_INVALID_FRAME"

      A received wire frame was malformed (too short, or an unsupported data-channel message type).

    • ReadonlyInvalidState: "FT_INVALID_STATE"

      An operation was attempted while the transfer was in an incompatible state, or a required API (e.g. WebCrypto) was unavailable.

    • ReadonlyOfferRejected: "FT_OFFER_REJECTED"

      The remote receiver declined the transfer offer (sent an ft-reject).

    • ReadonlySinkWriteFailed: "FT_SINK_WRITE_FAILED"

      Writing a received chunk to the destination StorageSink failed.

    • ReadonlySourceReadFailed: "FT_SOURCE_READ_FAILED"

      Reading a chunk from the outbound FileSource failed.

    • ReadonlyTimeout: "FT_TIMEOUT"

      An expected control message or acknowledgement did not arrive within the allotted time.