Rails - Error handler order
If you want to rescue multiple errors, you should declare general handlers
first. (eg: one for StandardError
) then specific ones.
For example:
rescue_from StandardError, with: :internal_server_error
rescue_from CustomError, with: :custom_error
rescue_from XXXError, with: :xxx_error
By this way, StandardError > CustomError > XXXError.