OpenBazaar / OpenBazaar-Server

(Deprecated) OpenBazaar 1.0 Server daemon for communication with OpenBazaar-Client

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

sgornick opened this issue · 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

A related issue might be Issue #465.