Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ clarify uncertainty before coding, and align suggestions with the rules linked b
- Use commits in `<type>(<scope>): summary` format; squash fixups locally before sharing

## Testing
[Fill in by LLM assistant]
- `swift test`: Run the SwiftPM test suite

## Environment
[Fill in by LLM assistant]
Expand Down
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# 3.8.0

## Breaking changes
- `TUSClientError.couldNotGetFileStatus` now includes an `underlyingError` for better diagnostics.

# 3.7.0

- Removed cocoapods support
Expand Down
6 changes: 3 additions & 3 deletions Sources/TUSKit/TUSClientError.swift
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ public enum TUSClientError: Error, LocalizedError {
case couldNotStoreFileMetadata(underlyingError: Error)
case couldNotCreateFileOnServer(underlyingError: Error)
case couldNotUploadFile(underlyingError: Error)
case couldNotGetFileStatus
case couldNotGetFileStatus(underlyingError: Error)
case fileSizeMismatchWithServer
case couldNotDeleteFile(underlyingError: Error)
case uploadIsAlreadyFinished
Expand Down Expand Up @@ -40,8 +40,8 @@ public enum TUSClientError: Error, LocalizedError {
return "Could not create file on server: (\(underlyingError.localizedDescription))"
case .couldNotUploadFile(let underlyingError):
return "Could not upload file: \(underlyingError.localizedDescription)"
case .couldNotGetFileStatus:
return "Could not get file status."
case .couldNotGetFileStatus(let underlyingError):
return "Could not get file status: \(underlyingError.localizedDescription)"
case .fileSizeMismatchWithServer:
return "File size mismatch with server."
case .couldNotDeleteFile(let underlyingError):
Expand Down
2 changes: 1 addition & 1 deletion Sources/TUSKit/Tasks/StatusTask.swift
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ final class StatusTask: IdentifiableTask {
} catch let error as TUSClientError {
completed(.failure(error))
} catch {
completed(.failure(TUSClientError.couldNotGetFileStatus))
completed(.failure(TUSClientError.couldNotGetFileStatus(underlyingError: error)))
}
}
}
Expand Down
Loading