-
Notifications
You must be signed in to change notification settings - Fork 23
Open
Description
Недавно в этом месте:
cloud_payments/lib/cloud_payments/namespaces/base.rb
Lines 38 to 40 in c6f5ed6
| def raise_reasoned_gateway_error(body) | |
| fail Client::GATEWAY_ERRORS[body[:model][:reason_code]].new(body) if reason_present?(body) | |
| end |
Несколько раз выскочило NoMethodError · undefined method new' for nil:NilClass`
Предлагаю такое решение:
def raise_reasoned_gateway_error(body)
return unless reason_present?(body)
error_class = Client::GATEWAY_ERRORS[body[:model][:reason_code]]
fail error_class.new(body) if error_class
end
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels