Sha256: 5325855b10698361382bad3e22d6fb54bd2f472225286d4ef563998dac7c768a

Contents?: true

Size: 525 Bytes

Versions: 25

Compression:

Stored size: 525 Bytes

Contents

module FunWithJsonApi
  module Exceptions
    # Indicates a Supplied relationships value is not able to be found
    class MissingRelationship < FunWithJsonApi::Exception
      def initialize(message, payload = ExceptionPayload.new)
        payload = Array.wrap(payload).each do |missing|
          missing.code ||= 'missing_relationship'
          missing.title ||= I18n.t(:missing_relationship, scope: 'fun_with_json_api.exceptions')
          missing.status ||= '404'
        end
        super
      end
    end
  end
end

Version data entries

25 entries across 25 versions & 1 rubygems

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