Print body error

This commit is contained in:
Christoph Hagen 2022-06-11 00:46:37 +02:00
parent 2860b5c3fc
commit 281ae66387

View File

@ -33,7 +33,7 @@ func routes(_ app: Application) throws {
throw Abort(.badRequest) throw Abort(.badRequest)
} }
guard let buffer = request.body.data else { guard let buffer = request.body.data else {
log("Invalid body data") log("Missing body data: \(request.body.description)")
throw CapError.invalidBody throw CapError.invalidBody
} }
let data = Data(buffer: buffer) let data = Data(buffer: buffer)