CentreForDigitalHumanities / CentreForDigitalHumanities/django-shared-core
Inconsistent behaviour cdh.rest.client.clients.ResourceClient
- Dominant language
- JavaScript
- Stars
- 1
- Forks
- 2
- PR merge metrics
- No merged PRs in 30d
Description
While the `ResourceClient` interface is quite useful, it encompasses a tricky design choice. If a REST request fails because of a `requests.exceptions.ConnectionError`, it will return `None` (in `ResourceClient.get()`) or `False` (in `put()` and `delete()`)
Other errors will cause an exception to be raised, which seems to me a more desirable choice.
I can write a PR for this change, but I'd like to know whether any other systems use `ResourceClient` besides PPN and babex.
(see https://github.com/UiL-OTS-labs/ppn-backend/issues/173 for a related issue)
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.