Untitled
unknown
ruby
a year ago
495 B
7
Indexable
## Good
def retry
WebHooks::Events::ResendService.new(hook_log).execute
redirect_to after_retry_redirect_path
rescue StandardError => e
flash[:warning] = e.message
redirect_back(fallback_location: after_retry_redirect_path)
end
## Bad
def retry
begin
WebHooks::Events::ResendService.new(hook_log).execute
redirect_to after_retry_redirect_path
rescue StandardError => e
flash[:warning] = e.message
redirect_back(fallback_location: after_retry_redirect_path)
end
endEditor is loading...
Leave a Comment