Sha256: 1417c0c389bd6055be48ce34ac2d70ac25c66cec5873fb3222b2f1b1ab57eb82

Contents?: true

Size: 531 Bytes

Versions: 15

Compression:

Stored size: 531 Bytes

Contents

module FunWithJsonApi
  module Exceptions
    class RelationshipMethodNotSupported < FunWithJsonApi::Exception
      EXCEPTION_CODE = 'collection_method_not_supported'.freeze

      def initialize(message, payload = ExceptionPayload.new)
        payload = Array.wrap(payload).each do |unsupported|
          unsupported.code ||= EXCEPTION_CODE
          unsupported.title ||= I18n.t(EXCEPTION_CODE, scope: 'fun_with_json_api.exceptions')
          unsupported.status ||= '403'
        end
        super
      end
    end
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
fun_with_json_api-0.0.14 lib/fun_with_json_api/exceptions/relationship_method_not_supported.rb
fun_with_json_api-0.0.13 lib/fun_with_json_api/exceptions/relationship_method_not_supported.rb
fun_with_json_api-0.0.11.3 lib/fun_with_json_api/exceptions/relationship_method_not_supported.rb
fun_with_json_api-0.0.11.2 lib/fun_with_json_api/exceptions/relationship_method_not_supported.rb
fun_with_json_api-0.0.11.1 lib/fun_with_json_api/exceptions/relationship_method_not_supported.rb
fun_with_json_api-0.0.11 lib/fun_with_json_api/exceptions/relationship_method_not_supported.rb
fun_with_json_api-0.0.10.4 lib/fun_with_json_api/exceptions/relationship_method_not_supported.rb
fun_with_json_api-0.0.10.3 lib/fun_with_json_api/exceptions/relationship_method_not_supported.rb
fun_with_json_api-0.0.10.2 lib/fun_with_json_api/exceptions/relationship_method_not_supported.rb
fun_with_json_api-0.0.10.1 lib/fun_with_json_api/exceptions/relationship_method_not_supported.rb
fun_with_json_api-0.0.10 lib/fun_with_json_api/exceptions/relationship_method_not_supported.rb
fun_with_json_api-0.0.9 lib/fun_with_json_api/exceptions/relationship_method_not_supported.rb
fun_with_json_api-0.0.8.2 lib/fun_with_json_api/exceptions/relationship_method_not_supported.rb
fun_with_json_api-0.0.8.1 lib/fun_with_json_api/exceptions/relationship_method_not_supported.rb
fun_with_json_api-0.0.8 lib/fun_with_json_api/exceptions/relationship_method_not_supported.rb