Skip to content

Commit

Permalink
Updates: Only log generic errors when checking for updates
Browse files Browse the repository at this point in the history
That's because we're unable to give proper feedback to users about what
to do to solve the error.
  • Loading branch information
ccordoba12 committed Mar 9, 2024
1 parent ff5a846 commit fe733cf
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions spyder/workers/updates.py
Original file line number Diff line number Diff line change
Expand Up @@ -166,15 +166,10 @@ def start(self):
error_msg = HTTP_ERROR_MSG.format(status_code=page.status_code)
logger.debug(err, stack_info=True)
except Exception as err:
error = traceback.format_exc()
formatted_error = error.replace('\n', '<br>').replace(' ', '&nbsp;')

error_msg = _(
'It was not possible to check for Spyder updates due to the '
'following error:'
'<br><br>'
'<tt>{}</tt>'
).format(formatted_error)
# Only log the error when it's a generic one because we can't give
# users proper feedback on how to address it. Otherwise we'd show
# a long traceback that most probably would be incomprehensible to
# them.
logger.debug(err, stack_info=True)

# At this point we **must** emit the signal below so that the "Check
Expand Down

0 comments on commit fe733cf

Please sign in to comment.