Sha256: 7f3208a4b4046f1adfaf9be5ab8ecf83bd3c94787f312bcc2f22765c3c655a04

Contents?: true

Size: 620 Bytes

Versions: 23

Compression:

Stored size: 620 Bytes

Contents

module FunWithJsonApi
  module Exceptions
    # A server MUST return 403 Forbidden in response to an unsupported request to create a resource
    # with a client-generated ID.
    class IllegalClientGeneratedIdentifier < FunWithJsonApi::Exception
      EXCEPTION_CODE = 'illegal_client_generated_identifier'.freeze

      def initialize(message, payload = ExceptionPayload.new)
        payload.code ||= EXCEPTION_CODE
        payload.title ||= I18n.t(EXCEPTION_CODE, scope: 'fun_with_json_api.exceptions')
        payload.status ||= '403'
        payload.pointer ||= '/data/id'
        super
      end
    end
  end
end

Version data entries

23 entries across 23 versions & 1 rubygems

Version Path
fun_with_json_api-0.0.14 lib/fun_with_json_api/exceptions/illegal_client_generated_identifier.rb
fun_with_json_api-0.0.13 lib/fun_with_json_api/exceptions/illegal_client_generated_identifier.rb
fun_with_json_api-0.0.11.3 lib/fun_with_json_api/exceptions/illegal_client_generated_identifier.rb
fun_with_json_api-0.0.11.2 lib/fun_with_json_api/exceptions/illegal_client_generated_identifier.rb
fun_with_json_api-0.0.11.1 lib/fun_with_json_api/exceptions/illegal_client_generated_identifier.rb
fun_with_json_api-0.0.11 lib/fun_with_json_api/exceptions/illegal_client_generated_identifier.rb
fun_with_json_api-0.0.10.4 lib/fun_with_json_api/exceptions/illegal_client_generated_identifier.rb
fun_with_json_api-0.0.10.3 lib/fun_with_json_api/exceptions/illegal_client_generated_identifier.rb
fun_with_json_api-0.0.10.2 lib/fun_with_json_api/exceptions/illegal_client_generated_identifier.rb
fun_with_json_api-0.0.10.1 lib/fun_with_json_api/exceptions/illegal_client_generated_identifier.rb
fun_with_json_api-0.0.10 lib/fun_with_json_api/exceptions/illegal_client_generated_identifier.rb
fun_with_json_api-0.0.9 lib/fun_with_json_api/exceptions/illegal_client_generated_identifier.rb
fun_with_json_api-0.0.8.2 lib/fun_with_json_api/exceptions/illegal_client_generated_identifier.rb
fun_with_json_api-0.0.8.1 lib/fun_with_json_api/exceptions/illegal_client_generated_identifier.rb
fun_with_json_api-0.0.8 lib/fun_with_json_api/exceptions/illegal_client_generated_identifier.rb
fun_with_json_api-0.0.7 lib/fun_with_json_api/exceptions/illegal_client_generated_identifier.rb
fun_with_json_api-0.0.6.pre.alpha.2 lib/fun_with_json_api/exceptions/illegal_client_generated_identifier.rb
fun_with_json_api-0.0.6.pre.alpha.1 lib/fun_with_json_api/exceptions/illegal_client_generated_identifier.rb
fun_with_json_api-0.0.6.1 lib/fun_with_json_api/exceptions/illegal_client_generated_identifier.rb
fun_with_json_api-0.0.6 lib/fun_with_json_api/exceptions/illegal_client_generated_identifier.rb