koordinates/python-client

Metadata posts raise exception when 204 not return

Closed this issue · 3 comments

As per the below, When making a metadata post request via the python client an exception is raised each time. This is because the set method ensures all responses are of the 204 status code. The actual response returned is a 200. This also an issue as data has been created and a 201 would be desirable.

This gist can be used to see a 200 is returned

if r.status_code != 204:
raise exceptions.ServerError("Expected 204 response, got %s: %s" % (r.status_code, url))

@SPlanzer -- fixes for this and #26 have been merged to master. Are you able to test from source?

@hamishcampbell - Thanks a lot. I will test from source.

Thanks @hamishcampbell Changes are exactly as I expect. - Closed