class HabiticaCli::Api::HabiticaResponseMiddleware
generic handling for habitica responses
Public Instance Methods
call(request_env)
click to toggle source
# File lib/habitica_cli/api.rb, line 25 def call(request_env) @app.call(request_env).on_complete do |response_env| fail ApiError.new(response_env) unless response_env.success? # rubocop:disable Style/RaiseArgs, Metrics/LineLength response_env end end