Class: Apiwork::Adapter::Wrapper::Error::Base

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

Overview

Base class for error response wrappers.

Error wrappers structure responses for validation errors and other error conditions. Extend this class to customize how errors are wrapped in your API responses.

Examples:

Custom error wrapper

class MyErrorWrapper < Wrapper::Error::Base
  shape do
    extends(data_type)
  end

  def wrap
    data
  end
end

Direct Known Subclasses

Default

Instance Attribute Summary

Attributes inherited from Base

#data

Method Summary

Methods inherited from Base

#initialize, shape, wrap, #wrap

Constructor Details

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