OpenBazaar-Server
OpenBazaar-Server copied to clipboard
Delete contract with invalid ID returns 200 OK, not 404 Not Found
Using the API, an attempt to DELETE a contract for a listing where the value passed for the id argument is invalid will cause the response to be a status 200 / OK.
Expected would be a 404 Not Found, as described here: http://www.restapitutorial.com/lessons/httpmethods.html
Operating System (OS and version): Ubuntu 14.04 OpenBazaar version: 0.2.1
Reproducible: Always
Steps to reproduce:
1. $ python testdeleteinvalid.py
Observed Behavior:
There were no exceptions thrown.
Expected Behavior:
assert r.status_code == 200
AssertionError
Additional info (links, images, etc go here): testdeleteinvalid.py is attached, and is available here as a gist:
Additional info: testdeleteinvalid.py script: https://gist.github.com/sgornick/077bc0fdec64813cf725ec3835026dcb#file-testdeleteinvalid-py, or saved as .txt since github doesn't support .py attachments.
A related issue might be Issue #465.