lib/shamu/services/error.rb in shamu-0.0.9 vs lib/shamu/services/error.rb in shamu-0.0.11

- old
+ new

@@ -18,7 +18,17 @@ class IncompleteSetupError < Error def initialize( message = :incomplete_setup ) super end end + + class ServiceRequestFailedError < Error + attr_reader :result + + def initialize( result ) + @result = result + + super translate( :service_request_failed, errors: result.errors.full_messages.join( ', ' ) ) + end + end end -end \ No newline at end of file +end