Sha256: 742cb5c79ff08f51a3c401b613eb9d49393f92428aca8d12f9b73d8f164141e6

Contents?: true

Size: 368 Bytes

Versions: 25

Compression:

Stored size: 368 Bytes

Contents

module FunWithJsonApi
  module Exceptions
    class InvalidDocument < FunWithJsonApi::Exception
      def initialize(message, payload = ExceptionPayload.new)
        payload.code ||= 'invalid_document'
        payload.title ||= I18n.t(:invalid_document, scope: 'fun_with_json_api.exceptions')
        payload.status ||= '400'
        super
      end
    end
  end
end

Version data entries

25 entries across 25 versions & 1 rubygems

Version Path
fun_with_json_api-0.0.5 lib/fun_with_json_api/exceptions/invalid_document.rb
fun_with_json_api-0.0.4 lib/fun_with_json_api/exceptions/invalid_document.rb
fun_with_json_api-0.0.3 lib/fun_with_json_api/exceptions/invalid_document.rb
fun_with_json_api-0.0.2 lib/fun_with_json_api/exceptions/invalid_document.rb
fun_with_json_api-0.0.1 lib/fun_with_json_api/exceptions/invalid_document.rb