templates/errors.rb in suspenders-1.14.0 vs templates/errors.rb in suspenders-1.15.0
- old
+ new
@@ -1,28 +1,34 @@
-require 'net/http'
-require 'net/smtp'
+require "net/http"
+require "net/smtp"
# Example:
# begin
# some http call
# rescue *HTTP_ERRORS => error
# notify_hoptoad error
# end
-HTTP_ERRORS = [Timeout::Error,
- Errno::EINVAL,
- Errno::ECONNRESET,
- EOFError,
- Net::HTTPBadResponse,
- Net::HTTPHeaderSyntaxError,
- Net::ProtocolError]
+HTTP_ERRORS = [
+ EOFError,
+ Errno::ECONNRESET,
+ Errno::EINVAL,
+ Net::HTTPBadResponse,
+ Net::HTTPHeaderSyntaxError,
+ Net::ProtocolError,
+ Timeout::Error
+]
-SMTP_SERVER_ERRORS = [TimeoutError,
- IOError,
- Net::SMTPUnknownError,
- Net::SMTPServerBusy,
- Net::SMTPAuthenticationError]
+SMTP_SERVER_ERRORS = [
+ IOError,
+ Net::SMTPAuthenticationError,
+ Net::SMTPServerBusy,
+ Net::SMTPUnknownError,
+ TimeoutError
+]
-SMTP_CLIENT_ERRORS = [Net::SMTPFatalError,
- Net::SMTPSyntaxError]
+SMTP_CLIENT_ERRORS = [
+ Net::SMTPFatalError,
+ Net::SMTPSyntaxError
+]
SMTP_ERRORS = SMTP_SERVER_ERRORS + SMTP_CLIENT_ERRORS