OpenBazaar-Server icon indicating copy to clipboard operation
OpenBazaar-Server copied to clipboard

Delete contract with invalid ID returns 200 OK, not 404 Not Found

Open sgornick opened this issue 8 years ago • 1 comments

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.

testdeleteinvalid.py.txt

sgornick avatar Jul 14 '16 18:07 sgornick

A related issue might be Issue #465.

sgornick avatar Jul 14 '16 18:07 sgornick