8 Commits

Author SHA1 Message Date
HoneyryderChuck
f768cf7a0e Improving API compatibility and error checking in responses
* `Response#error`, which, coupled with `ErrorResponse#error`, allows
  for `if response.error` kind of conditional;
* `Response#raise_for_status` now returns the response when no error is
  raise (for method chaining);

Closes #153
2021-09-20 13:02:20 +01:00
HoneyryderChuck
7aea7fe471 removing a few method_missing implementations
replacing them with SimpleDelegator where it made sense, and removing
them altogether whenever possible. ErrorResponse doesn't have a special
handling for Response methods anymore, but it's highly debatable if it
should.
2021-07-21 15:31:49 +01:00
HoneyryderChuck
1cf6e5aac7 new option: origin
by setting the origin, one can pass relative paths to httpx, which will
be appended when building the request.
2021-05-04 20:09:50 +01:00
HoneyryderChuck
edfd92ea60 added test for to_s rep of error response (i.e. must contain the canonical message class def) 2021-02-19 16:42:39 +00:00
HoneyryderChuck
9efd2a0a2e fixed the request mock, which triggered a typing error 2020-10-30 16:19:18 +00:00
HoneyryderChuck
5823a040d0 adding more methods necessary for the faraday adapter when it comes to multi-response errors 2020-04-13 18:07:27 +01:00
HoneyryderChuck
9a4b836ae7 error response must also reflect the request 2019-05-24 17:58:29 +03:00
HoneyryderChuck
05d9ca909f added a way to log exceptions, and use it in error responses, which are now tested 2018-12-31 02:55:03 +00:00