Class UploadErrorCodes
Contains the error codes (ErrorCode) of the errors that the chunked uploads of the Singulink.Net.Http.Api.Service
package report, so that apps and their clients can tell the failures apart and word them in their own way.
Namespace: Singulink.Net.Http.Api
Assembly: Singulink.Net.Http.Api.dll
Syntax
public static class UploadErrorCodes
Fields
| Name | Description |
|---|---|
| ChunkInvalid | A chunk's |
| Closed | A chunk arrives for an upload whose handler is running or has finished. Thrown as a ConflictApiException. |
| CreationNotJson | The body of a creation of an upload is not JSON, by its content type. Thrown as an UnsupportedMediaTypeApiException. |
| CreationPending | The idempotency key of a creation (see IdempotencyKey) is reserved by an earlier creation of the user that has not finished creating its upload yet, such as one whose response the client did not wait for, or the stale reservation of a creation that stopped can't be released yet. Thrown as a ServiceUnavailableApiException, with RetryAfter set: the creation made again gets the upload once it is created, or creates its own once the stale reservation is released. |
| CreationTooLarge | The body of a creation of an upload is larger than 64 KiB, or than a smaller request size limit of the server. Thrown as a ContentTooLargeApiException. |
| CreationUnreadable | The body of a creation of an upload can't be read as a creation: it is not valid JSON, it is |
| ExceedsSizeLimit | The length of an upload is over the most that the open uploads of a user can have together, so that the upload can never be created, whatever other uploads the user has. Thrown as a ContentTooLargeApiException. |
| Incomplete | The completion of an upload arrives while chunks of the upload are missing. Thrown as a ConflictApiException. |
| Interrupted | The handler of the upload stopped before it finished, because the service stopped or failed while it ran, because the server that ran it lost the claim of its run, or because it ran past its time limit. Reported as a ServerErrorApiException. This is the upload's final outcome: the handler does not run again, so the file is uploaded again to retry. |
| Invalid | The creation of an upload is not valid: its file name is empty or longer than 255 characters, its length is negative, its content type is longer than 255 characters, its chunk size is not positive, its idempotency key is empty or longer than 128 characters, or its command cannot be read or is missing where the endpoint's validator or handler requires one. Thrown as a BadRequestApiException. |
| KeyConflict | The idempotency key of a creation (see IdempotencyKey) is the key of an earlier upload of the user for another endpoint, other route values, another query string, or another file name, length, content type or command. Thrown as a ConflictApiException. |
| LimitReached | The user already has the maximum number of open uploads, which are the uploads that are receiving chunks or whose handler is running. Thrown as a TooManyRequestsApiException. |
| NotFound | The upload is unknown, expired or aborted, or it belongs to another user, another endpoint or other route values. Thrown as a NotFoundApiException. |
| OutcomeUnreadable | The stored outcome of an upload can't be read, such as a file of the directory store that was damaged. Reported as a ServerErrorApiException. This is the upload's final outcome: the handler does not run again, so the file is uploaded again to retry. |
| QueryMismatch | The query string of the completion of an upload differs from the one the upload was created with, other than the user ID precondition, so that the handler would bind other values than the validator did. Thrown as a ConflictApiException. |
| ServerStopping | The server that a completion of an upload reached is stopping, while the completion waits for the handler that runs on another server or before the completion starts the handler. Thrown as a ServiceUnavailableApiException, with RetryAfter set: the completion made again gets the handler's run from another server, or starts it there. |
| SizeLimitReached | The open uploads of the user, which are the uploads that are receiving chunks or whose handler is running, would together be longer than the service allows for a user. Thrown as a TooManyRequestsApiException. |
| StorageFull | The open uploads have reached their total size limit, or the upload store has no room for the upload. Thrown as a ServiceUnavailableApiException, with RetryAfter set. |
| StoreUnavailable | The upload store failed, such as a share that the service could not reach for a moment. Thrown as a ServiceUnavailableApiException, with RetryAfter set. |
| TooLarge | The length of an upload is over the maximum size of its endpoint, or the upload would need more chunks than the service allows at the largest chunk size. Thrown as a ContentTooLargeApiException. |