lib/flow/cli/utils/flow_api_rest.rb in flow-cli-0.0.3 vs lib/flow/cli/utils/flow_api_rest.rb in flow-cli-0.0.4

- old
+ new

@@ -9,10 +9,10 @@ %i[get delete head post patch put].each do |method| alias_method "#{method}_old", method define_method method do |*args, &blk| ret = __send__ "#{method}_old", *args, &blk - raise "response_body = #{ret[:response_body]}" if ret.is_a?(Hash) && ret[:status] == false + raise FlowApiError, "response_body = #{ret[:response_body]}" if ret.is_a?(Hash) && ret[:status] == false ret end end end end