I am using URLSessionConfiguration.background and uploadTask to upload a file from an iOS app.
request.httpMethod = "POST"
request.setValue("application/octect-stream", forHTTPHeaderField: "Content-Type")
let task = uploadURLSession.uploadTask(with: request, fromFile: fileURL)
I'd like to understand how to manage the error handling.
How the http errors 4xx or 5xx are handled by the URLSession.uploadTask?