Ruby

Ruby

Made by DeepSource

Exception class overwritten by its result RB-E1001

Bug risk
Major
Autofix

You intended to write as rescue StandardError. However, you have written rescue => StandardError. In that case, the result of rescue will overwrite StandardError.

Bad practice

begin
  something
rescue => StandardError
end

Recommended

begin
  something
rescue StandardError
end