Closed rajadain closed 5 years ago
This is on me, I updated the response but did not update the restclient to look for the updated code. You've done all the investigative work, so I'll turn this around pretty quickly. Do you need a release pushed to pip right away or are you comfortable installing straight from github? I've got some more work I've got to implement in the rest_client that'll take a little more time, but I can do a patch release if you need it.
If you expect a release in the next week or so, that's alright. We're doing some tech debt cleanup on MMW, discovered this while exercising the app. I'll make a follow up card on our side to update the hs_restclient version once this has been released.
On a side note: we're currently on 1.2.10
. Is there a changelog, or any breaking changes since that version?
There shouldn't be any breaking features, I try not to do that because it generates more work for me. There are several additions, largely just adding support for new endpoints.
https://github.com/hydroshare/hs_restclient/blob/develop/RELEASE_NOTES.md
I can turn around a release next week. I'll keep you posted.
@rajadain - I just pushed out 1.3.4 with this fix. Please let me know if everything works as expected.
Thanks @sblack-usu, this was upgraded and verified in https://github.com/WikiWatershed/model-my-watershed/pull/3134. This issue can now be closed.
Previously, this code used to work:
It now fails with the following error message:
This is because the HydroShare API recently switched from sending back a
200 OK
to a204 NO CONTENT
https://github.com/hydroshare/hydroshare/commit/c99b8423c38b3dce020e4a3a03e9c55ab0201b7d#diff-69f87776b87c2b6db0a596870ce8c6d1R155.To fix this, the
deleteResource
method should be updated to handle 204s in addition to 200s:https://github.com/hydroshare/hs_restclient/blob/9cd106238b512e01ecd3e33425fe48c13b7f63d5/hs_restclient/__init__.py#L784-L791