Module: Gritz::Compat::Gruf::ErrorHelpers
- Included in:
- Controller, ServerInterceptor
- Defined in:
- /home/runner/work/gritz/gritz/sources/gritz-core/lib/gritz/compat/gruf.rb
Instance Method Summary collapse
- #add_field_error ⇒ Object
- #fail!(code, app_code = nil, message = "", metadata = {}) ⇒ Object
-
#has_field_errors? ⇒ Boolean
rubocop:disable Naming/PredicatePrefix -- Preserve the upstream Gruf method name.
- #set_debug_info ⇒ Object
Instance Method Details
#add_field_error ⇒ Object
131 |
# File '/home/runner/work/gritz/gritz/sources/gritz-core/lib/gritz/compat/gruf.rb', line 131 def add_field_error(...) = error.add_field_error(...) |
#fail!(code, app_code = nil, message = "", metadata = {}) ⇒ Object
135 136 137 138 139 140 141 |
# File '/home/runner/work/gritz/gritz/sources/gritz-core/lib/gritz/compat/gruf.rb', line 135 def fail!(code, app_code = nil, = "", = {}) error.code = code.to_sym error.app_code = app_code ? app_code.to_sym : error.code error. = .to_s error. = error.fail!(request.active_call) end |
#has_field_errors? ⇒ Boolean
rubocop:disable Naming/PredicatePrefix -- Preserve the upstream Gruf method name.
132 |
# File '/home/runner/work/gritz/gritz/sources/gritz-core/lib/gritz/compat/gruf.rb', line 132 def has_field_errors? = error.has_field_errors? # rubocop:disable Naming/PredicatePrefix -- Preserve the upstream Gruf method name. |
#set_debug_info ⇒ Object
133 |
# File '/home/runner/work/gritz/gritz/sources/gritz-core/lib/gritz/compat/gruf.rb', line 133 def set_debug_info(...) = error.set_debug_info(...) |