Skip to main content

TusUploadException

Namespace: Meshmakers.Octo.Sdk.ServiceClient.BotServices

Thrown when a part of a tus upload to the bot services is refused or cannot be delivered.

public sealed class TusUploadException : ServiceClientException, ISerializable

Inheritance Object → Exception → ServiceClientException → TusUploadException
Implements ISerializable

Remarks:

The upload runs in parts (BotServiceClientOptions.TusPartSizeBytes). The exception names the part and its offset so a refused upload is reported for what it is — in older versions a refused single-request upload surfaced only later as a restore job failing on an "empty (0 bytes)" file.

It carries no file content and no response body: only the status, the part number, the offset and the part size.

Properties​

StatusCode​

The HTTP status answered for the part; null when the connection failed before an answer arrived.

public Nullable<HttpStatusCode> StatusCode { get; }

Property Value​

Nullable<HttpStatusCode>

PartNumber​

The 1-based number of the part that failed.

public long PartNumber { get; }

Property Value​

Int64

PartCount​

The number of parts of the whole upload.

public long PartCount { get; }

Property Value​

Int64

Offset​

The byte offset of the failed part within the file.

public long Offset { get; }

Property Value​

Int64

PartSizeBytes​

The configured maximum size of one part in bytes.

public long PartSizeBytes { get; }

Property Value​

Int64

TargetSite​

public MethodBase TargetSite { get; }

Property Value​

MethodBase

Message​

public string Message { get; }

Property Value​

String

Data​

public IDictionary Data { get; }

Property Value​

IDictionary

InnerException​

public Exception InnerException { get; }

Property Value​

Exception

public string HelpLink { get; set; }

Property Value​

String

Source​

public string Source { get; set; }

Property Value​

String

HResult​

public int HResult { get; set; }

Property Value​

Int32

StackTrace​

public string StackTrace { get; }

Property Value​

String

Constructors​

TusUploadException(String, Nullable<HttpStatusCode>, Int64, Int64, Int64, Int64, Exception)​

Constructor.

public TusUploadException(string message, Nullable<HttpStatusCode> statusCode, long partNumber, long partCount, long offset, long partSizeBytes, Exception inner)

Parameters​

message String
The message; describes the failed part without file content.

statusCode Nullable<HttpStatusCode>
The HTTP status the server (or the ingress in front of it) answered, if any.

partNumber Int64
The 1-based number of the part that failed.

partCount Int64
The number of parts of the whole upload.

offset Int64
The byte offset of the part within the file.

partSizeBytes Int64
The configured maximum part size.

inner Exception
The underlying exception, if the failure had no HTTP answer.