twingly / twingly-search-api-ruby

:gem: Twingly Blog Search API in Ruby
https://developer.twingly.com/
MIT License
4 stars 0 forks source link

AuthError -> AuthenticationError/AuthorizationError #86

Closed jage closed 5 years ago

jage commented 5 years ago

Breaking change, removes AuthError exception from Search API

replacing AuthError with AuthenticationError (invalid API key) and AuthorizationError (denied access to a search feature). Both AuthenticationError and AuthorizationError inherits from AuthError to avoid breaking the API.

There's a slight inconsistency in the API since the API docs notes that 401 is "Unauthorized" when it should be "Unauthenticated": https://developer.twingly.com/resources/search/#4xx-client-errors

Though this is a separate concern of the HTTP API.

Close #80

jage commented 5 years ago

Should we update LiveFeed once we're at it (also breaking)? LiveFeed don't have authorization error (no request options that can be stopped), so it would be a rename AuthError -> AuthenticationError.