Class: Apiwork::Adapter::Wrapper::Error::Default

Inherits:
Base
  • Object
show all
Defined in:
lib/apiwork/adapter/wrapper/error/default.rb

Overview

Default error response wrapper.

Passes serialized error data through unchanged.

Examples:

Configuration

class MyAdapter < Adapter::Base
  error_wrapper Wrapper::Error::Default
end

Output

{
  "issues": [{ "code": "blank", "detail": "can't be blank", ... }],
  "layer": "domain"
}

Instance Attribute Summary

Attributes inherited from Base

#data

Instance Method Summary collapse

Methods inherited from Base

#initialize, shape, wrap

Constructor Details

This class inherits a constructor from Apiwork::Adapter::Wrapper::Base

Instance Method Details

#wrapObject



27
28
29
# File 'lib/apiwork/adapter/wrapper/error/default.rb', line 27

def wrap
  data
end