UploadError
open class UploadError : DataError, @unchecked Sendable
Exception thrown by DataSyncProvider.upload when one or more pending requests cannot be uploaded due to a backend failure.
The message for this exception will not be localized.
Please use the properties (failureCount, successCount, notSentCount) for error handling and user notification.
See also
OfflineDataService.getFailedRequests, to list the failed requests after an UploadException has been thrown.
-
The number of requests that failed to upload successfully, therefore remaining as pending requests. Reasons for not failing a request include may network communication errors, or the backend system returning a non-successful HTTP status code.
Declaration
Swift
final public var failureCount: Int -
The number of requests that were not sent, therefore remaining as pending requests. Reasons for not sending a request include may network communication errors, or having dependencies on other requests that failed or could not be sent.
Declaration
Swift
final public var notSentCount: Int -
The number of requests that uploaded successfully.
Declaration
Swift
final public var successCount: Int -
Default initializer.
Declaration
Swift
override public init() -
Declaration
Swift
open class func withMessage(_ message: String) -> UploadErrorParameters
messageMessage text.
Return Value
A new exception with the specified message text.