Sha256: 4433ea128ae2db3e47cac37d36f46520f2136ff1436449fabf3ac8dbfc425bb6

Contents?: true

Size: 553 Bytes

Versions: 23

Compression:

Stored size: 553 Bytes

Contents

module FunWithJsonApi
  module Exceptions
    # Indicates a supplied relationships type does match expected values
    class InvalidRelationshipType < FunWithJsonApi::Exception
      ERROR_CODE = 'invalid_relationship_type'.freeze

      def initialize(message, payload = ExceptionPayload.new)
        Array.wrap(payload).each do |invalid|
          invalid.code ||= ERROR_CODE
          invalid.title ||= I18n.t(ERROR_CODE, scope: 'fun_with_json_api.exceptions')
          invalid.status ||= '409'
        end
        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/invalid_relationship_type.rb
fun_with_json_api-0.0.13 lib/fun_with_json_api/exceptions/invalid_relationship_type.rb
fun_with_json_api-0.0.11.3 lib/fun_with_json_api/exceptions/invalid_relationship_type.rb
fun_with_json_api-0.0.11.2 lib/fun_with_json_api/exceptions/invalid_relationship_type.rb
fun_with_json_api-0.0.11.1 lib/fun_with_json_api/exceptions/invalid_relationship_type.rb
fun_with_json_api-0.0.11 lib/fun_with_json_api/exceptions/invalid_relationship_type.rb
fun_with_json_api-0.0.10.4 lib/fun_with_json_api/exceptions/invalid_relationship_type.rb
fun_with_json_api-0.0.10.3 lib/fun_with_json_api/exceptions/invalid_relationship_type.rb
fun_with_json_api-0.0.10.2 lib/fun_with_json_api/exceptions/invalid_relationship_type.rb
fun_with_json_api-0.0.10.1 lib/fun_with_json_api/exceptions/invalid_relationship_type.rb
fun_with_json_api-0.0.10 lib/fun_with_json_api/exceptions/invalid_relationship_type.rb
fun_with_json_api-0.0.9 lib/fun_with_json_api/exceptions/invalid_relationship_type.rb
fun_with_json_api-0.0.8.2 lib/fun_with_json_api/exceptions/invalid_relationship_type.rb
fun_with_json_api-0.0.8.1 lib/fun_with_json_api/exceptions/invalid_relationship_type.rb
fun_with_json_api-0.0.8 lib/fun_with_json_api/exceptions/invalid_relationship_type.rb
fun_with_json_api-0.0.7 lib/fun_with_json_api/exceptions/invalid_relationship_type.rb
fun_with_json_api-0.0.6.pre.alpha.2 lib/fun_with_json_api/exceptions/invalid_relationship_type.rb
fun_with_json_api-0.0.6.pre.alpha.1 lib/fun_with_json_api/exceptions/invalid_relationship_type.rb
fun_with_json_api-0.0.6.1 lib/fun_with_json_api/exceptions/invalid_relationship_type.rb
fun_with_json_api-0.0.6 lib/fun_with_json_api/exceptions/invalid_relationship_type.rb