Module: OmniService::Helpers
- Defined in:
- lib/omni_service/helpers.rb
Overview
Instance-level utility methods included via OmniService::Convenience.
Instance Method Summary collapse
Instance Method Details
#process_errors(result, path_prefix: []) ⇒ Object
13 14 15 16 17 18 19 |
# File 'lib/omni_service/helpers.rb', line 13 def process_errors(result, path_prefix: []) return result if result.success? Failure(OmniService::Error.process(self, result.failure).map do |error| error.new(path: [*path_prefix, *error.path]) end) end |