lib/scrivito/client_error.rb in scrivito_sdk-1.0.0 vs lib/scrivito/client_error.rb in scrivito_sdk-1.1.0.rc1

- old
+ new

@@ -6,8 +6,18 @@ def initialize(message, http_code, backend_code = nil) @http_code = http_code @backend_code = backend_code super(message) end + + def ==(client_error) + message == client_error.message && + http_code == client_error.http_code && + backend_code == client_error.backend_code + end + + def as_json + {message: message, backend_code: backend_code} + end end end