Skip to content
This repository has been archived by the owner on Apr 8, 2024. It is now read-only.

subscription manager client reports errors pretty poorly #512

Open
exarkun opened this issue Apr 14, 2017 · 0 comments
Open

subscription manager client reports errors pretty poorly #512

exarkun opened this issue Apr 14, 2017 · 0 comments

Comments

@exarkun
Copy link
Contributor

exarkun commented Apr 14, 2017

For example, if the server returns a 500, the traceback the client logs is:

main function encountered error
Traceback (most recent call last):
  File "/home/exarkun/Environments/leastauthority.com/local/lib/python2.7/site-packages/twisted/internet/defer.py", line 565, in _startRunCallbacks
    self._runCallbacks()
  File "/home/exarkun/Environments/leastauthority.com/local/lib/python2.7/site-packages/twisted/internet/defer.py", line 651, in _runCallbacks
    current.result = callback(current.result, *args, **kw)
  File "/home/exarkun/Environments/leastauthority.com/local/lib/python2.7/site-packages/twisted/internet/defer.py", line 457, in callback
    self._startRunCallbacks(result)
  File "/home/exarkun/Environments/leastauthority.com/local/lib/python2.7/site-packages/twisted/internet/defer.py", line 565, in _startRunCallbacks
    self._runCallbacks()
--- <exception caught here> ---
  File "/home/exarkun/Environments/leastauthority.com/local/lib/python2.7/site-packages/twisted/internet/defer.py", line 651, in _runCallbacks
    current.result = callback(current.result, *args, **kw)
  File "/home/exarkun/Work/LeastAuthority/leastauthority.com/lae_automation/subscription_manager.py", line 468, in check
    raise UnexpectedResponseCode(response, required)
lae_automation.subscription_manager.UnexpectedResponseCode: 

I would expect UnexpectedResponseCode to have a better string representation than that, given it is defined with attr. So I'm not quite sure what's happening here.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant