class SimpleJsonapi::Errors::WrappedError

A generic serializable error class.

Attributes

cause[RW]

@!attribute [rw] cause

The original error.
@return [Object]

@!attribute [rw] id

@return [String]

@!attribute [rw] status

@return [String]

@!attribute [rw] code

@return [String]

@!attribute [rw] title

@return [String]

@!attribute [rw] detail

@return [String]

@!attribute [rw] source_pointer

@return [String]

@!attribute [rw] source_parameter

@return [String]

@!attribute [rw] about_link

@return [String]
code[RW]

@!attribute [rw] cause

The original error.
@return [Object]

@!attribute [rw] id

@return [String]

@!attribute [rw] status

@return [String]

@!attribute [rw] code

@return [String]

@!attribute [rw] title

@return [String]

@!attribute [rw] detail

@return [String]

@!attribute [rw] source_pointer

@return [String]

@!attribute [rw] source_parameter

@return [String]

@!attribute [rw] about_link

@return [String]
detail[RW]

@!attribute [rw] cause

The original error.
@return [Object]

@!attribute [rw] id

@return [String]

@!attribute [rw] status

@return [String]

@!attribute [rw] code

@return [String]

@!attribute [rw] title

@return [String]

@!attribute [rw] detail

@return [String]

@!attribute [rw] source_pointer

@return [String]

@!attribute [rw] source_parameter

@return [String]

@!attribute [rw] about_link

@return [String]
id[RW]

@!attribute [rw] cause

The original error.
@return [Object]

@!attribute [rw] id

@return [String]

@!attribute [rw] status

@return [String]

@!attribute [rw] code

@return [String]

@!attribute [rw] title

@return [String]

@!attribute [rw] detail

@return [String]

@!attribute [rw] source_pointer

@return [String]

@!attribute [rw] source_parameter

@return [String]

@!attribute [rw] about_link

@return [String]
source_parameter[RW]

@!attribute [rw] cause

The original error.
@return [Object]

@!attribute [rw] id

@return [String]

@!attribute [rw] status

@return [String]

@!attribute [rw] code

@return [String]

@!attribute [rw] title

@return [String]

@!attribute [rw] detail

@return [String]

@!attribute [rw] source_pointer

@return [String]

@!attribute [rw] source_parameter

@return [String]

@!attribute [rw] about_link

@return [String]
source_pointer[RW]

@!attribute [rw] cause

The original error.
@return [Object]

@!attribute [rw] id

@return [String]

@!attribute [rw] status

@return [String]

@!attribute [rw] code

@return [String]

@!attribute [rw] title

@return [String]

@!attribute [rw] detail

@return [String]

@!attribute [rw] source_pointer

@return [String]

@!attribute [rw] source_parameter

@return [String]

@!attribute [rw] about_link

@return [String]
status[RW]

@!attribute [rw] cause

The original error.
@return [Object]

@!attribute [rw] id

@return [String]

@!attribute [rw] status

@return [String]

@!attribute [rw] code

@return [String]

@!attribute [rw] title

@return [String]

@!attribute [rw] detail

@return [String]

@!attribute [rw] source_pointer

@return [String]

@!attribute [rw] source_parameter

@return [String]

@!attribute [rw] about_link

@return [String]
title[RW]

@!attribute [rw] cause

The original error.
@return [Object]

@!attribute [rw] id

@return [String]

@!attribute [rw] status

@return [String]

@!attribute [rw] code

@return [String]

@!attribute [rw] title

@return [String]

@!attribute [rw] detail

@return [String]

@!attribute [rw] source_pointer

@return [String]

@!attribute [rw] source_parameter

@return [String]

@!attribute [rw] about_link

@return [String]

Public Class Methods

new(cause = nil, **attributes) click to toggle source

@param cause [Object] The underlying error @param attributes [Hash{Symbol => String}]

# File lib/simple_jsonapi/errors/wrapped_error.rb, line 27
def initialize(cause = nil, **attributes)
  self.cause = cause

  attributes.each do |name, value|
    send("#{name}=", value) if respond_to?("#{name}=")
  end
end