Open Derppening opened 4 years ago
I am unable to commit or cancel an empty transaction. I am unsure whether this is a bug on my side or I am doing something wrong.
Assuming the database is setup according to the README and web server is running:
200 OK
400 Bad Request
curl -v -X POST http://localhost:8081/BookManagementService/transaction\?token\=ccu6764 * Trying ::1:8081... * Connected to localhost (::1) port 8081 (#0) > POST /BookManagementService/transaction?token=ccu6764 HTTP/1.1 > Host: localhost:8081 > User-Agent: curl/7.70.0 > Accept: */* > * Mark bundle as not supporting multiuse < HTTP/1.1 200 OK < Date: Sun, 31 May 2020 14:47:36 GMT < Server: Apache-HttpCore-NIO/1.1 < Content-Length: 20 < Content-Type: application/json; charset=UTF-8 < * Connection #0 to host localhost left intact {"Transaction":2058}% david@david-desktop ~ curl -v -X POST --data "{\"Transaction\": 2058, \"Operation\": \"cancel\"}" http://localhost:8081/BookManagementService/transaction\?token\=ccu6764 Note: Unnecessary use of -X or --request, POST is already inferred. * Trying ::1:8081... * Connected to localhost (::1) port 8081 (#0) > POST /BookManagementService/transaction?token=ccu6764 HTTP/1.1 > Host: localhost:8081 > User-Agent: curl/7.70.0 > Accept: */* > Content-Length: 44 > Content-Type: application/x-www-form-urlencoded > * upload completely sent off: 44 out of 44 bytes * Mark bundle as not supporting multiuse < HTTP/1.1 400 Bad Request < Date: Sun, 31 May 2020 14:47:43 GMT < Server: Apache-HttpCore-NIO/1.1 < Content-Length: 0 < Connection: Close < * Closing connection 0
the empty transaction is, of course, valid in the database and our service
Issue description
I am unable to commit or cancel an empty transaction. I am unsure whether this is a bug on my side or I am doing something wrong.
Steps to reproduce the issue
Assuming the database is setup according to the README and web server is running:
What's the expected result?
200 OK
What's the actual result?
400 Bad Request