lib/3scale_toolbox/error.rb in 3scale_toolbox-0.9.0 vs lib/3scale_toolbox/error.rb in 3scale_toolbox-0.10.0

- old
+ new

@@ -3,6 +3,19 @@ class Error < ::StandardError end class InvalidUrlError < Error end + + class ThreeScaleApiError < Error + attr_reader :apierrors + + def initialize(msg = '', apierrors = {}) + @apierrors = apierrors + super(msg) + end + + def message + "#{super}. Errors: #{apierrors}" + end + end end