Hello,
My controller function is throwing like so:
throw Abort(.badRequest, reason: "\(error)")
On the client, where the response is received:
let task = URLSession.shared.dataTask(with: request) { _, response, error in
The error is nil and the response status is 400 (correct). I'm surprised that the error is nil. Is this expected? And if so, how would I return the reason or message from the server?
Thanks!