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

- old
+ new

@@ -2,11 +2,28 @@ # @api public class ScrivitoError < StandardError end +class ApplicationError < ScrivitoError + def http_code + 412 + end + + def as_json + {message: message, message_for_editor: message} + end +end + # @api public class ResourceNotFound < ScrivitoError + def http_code + 404 + end + + def as_json + {message: message} + end end # @api public class ObjClassNotFound < ResourceNotFound end