Corresponding exceptions from clj-http. #54
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi, @mattrepl .
First, Thank you for this useful library for OAuth with Clojure-life. :)
I'm using this to connect between my web application to Twitter APIs.
But I cared following points:
Corresponding the response body for clj-http
The HTTP request functions of clj-http will throw ExceptionInfo via slingshot.
throw+
is just it.Note that clj-http will throw this exception when status code is just 4xx or 5xx.
But current clj-oauth has thrown Exception even if status code is over 300...
The status code 3xx is redirect. It is not error.
This is not so good because errors from clj-http has been replaced other errors.
I thought better We follow errors from clj-http because it is doing well currently.
Therefore this code will not be needed.
Not ignoring other fields
Why did you ignore other fields? Those should not be ignored because are also needed for HTTP connections.
If we need to decode response body, this should be written following code instead:
Finally, I'll repeat that clj-oauth is very useful library. ;)