Skip to content

Commit

Permalink
Make Oktakit::Response::RaiseError#on_complete public
Browse files Browse the repository at this point in the history
A respond_to? guard clause in Faraday::Middleware prevents this
callback from ever executing when the method is private.

See https://github.com/lostisland/faraday/blob/main/lib/faraday/middleware.rb#L18
  • Loading branch information
ltk committed Jan 13, 2022
1 parent e588d28 commit 3b02b32
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions lib/oktakit/response/raise_error.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@ module Response
# This class raises an Oktakit-flavored exception based
# HTTP status codes returned by the API
class RaiseError < Faraday::Response::Middleware
private

def on_complete(response)
if (error = Oktakit::Error.from_response(response))
raise error
Expand Down

0 comments on commit 3b02b32

Please sign in to comment.