Edgewall Software
Modify

Opened 18 years ago

Closed 14 years ago

#4907 closed defect (duplicate)

Notifications errors should not show up as internal errors

Reported by: anders.silverfall@… Owned by: Jonas Borgström
Priority: normal Milestone:
Component: notification Version:
Severity: normal Keywords: error
Cc: Branch:
Release Notes:
API Changes:
Internal Changes:

Description (last modified by Christian Boos)

Simply creating a new ticket. Have edited components, and deleted version 2.0

…..

Traceback (most recent call last):
  File "C:\Python23\lib\site-packages\trac\ModPythonHandler.py", line 195, in handler
    core.dispatch_request(mpr.path_info, args, mpr, env)
  File "C:\Python23\lib\site-packages\trac\core.py", line 457, in dispatch_request
    module.run()
  File "C:\Python23\lib\site-packages\trac\Module.py", line 50, in run
    self.render()
  File "C:\Python23\lib\site-packages\trac\Ticket.py", line 302, in render
    self.create_ticket()
  File "C:\Python23\lib\site-packages\trac\Ticket.py", line 294, in create_ticket
    tn.notify(ticket, newticket=1)
  File "C:\Python23\lib\site-packages\trac\Notify.py", line 228, in notify
    NotifyEmail.notify(self, ticket['id'], subject)
  File "C:\Python23\lib\site-packages\trac\Notify.py", line 131, in notify
    Notify.notify(self, resid)
  File "C:\Python23\lib\site-packages\trac\Notify.py", line 79, in notify
    self.begin_send()
  File "C:\Python23\lib\site-packages\trac\Notify.py", line 139, in begin_send
    self.server = smtplib.SMTP(self.smtp_server)
  File "C:\Python23\lib\smtplib.py", line 240, in __init__
    (code, msg) = self.connect(host, port)
  File "C:\Python23\lib\smtplib.py", line 288, in connect
    for res in socket.getaddrinfo(host, port, 0, socket.SOCK_STREAM):
gaierror: (7, 'getaddrinfo failed')

Attachments (0)

Change History (3)

comment:1 by Christian Boos, 18 years ago

Description: modified (diff)
Keywords: notification added
Milestone: 0.12

Notification errors should probably be shown as a kind of warning (*) and not result in an internal error. The latter is misleading, because the actual changes were successful, just not the notification.

(*) A warning API could be developed, something like:

  req.warning("The e-mail notification couldn't be send: %s.\n"
              "Please inform your Trac administrator about the problem.")

which would collect some warnings (in req.chrome.warnings) that are intended to be shown to the end-user, in addition to the normal result. The layout.html will prepend a warning section to the actual content of the page if there are some warnings.

Those warnings should be of course used sparingly, only in situations like this, where a full error page is not needed but an error condition should nevertheless be reported to the user.

comment:2 by Christian Boos, 16 years ago

Component: generalnotification
Description: modified (diff)
Keywords: error added; notification removed
Summary: Bugg in ticket handlerNotifications errors should not show up as internal errors

comment:3 by Remy Blank, 14 years ago

Milestone: next-major-0.1X
Resolution: duplicate
Status: newclosed

This was fixed in [8739], as part of #8107.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Jonas Borgström.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from Jonas Borgström to the specified user.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.