What version are you running?
RBTools 0.6.1; ReviewBoard 1.7.14 (but the latter shouldn't matter)
What's the URL of the page containing the problem?
None - RBTools
What steps will reproduce the problem?
1. Attempt to post a review for a repository that can't be found using `rbt post`
2. Get relatively cryptic error:
ERROR: Error getting review requests for user jantman: One or more fields had errors (HTTP 400, API Error 105)
repository: 'None' is not an integer
What is the expected output? What do you see instead?
I'd like a helpful error message.
>>> Making HTTP GET request to http://reviews.ddtc.cmgdigital.com/api/repositories/
>>> Making HTTP GET request to http://reviews.ddtc.cmgdigital.com/api/repositories/?max-results=25&start=25
>>> Making HTTP GET request to http://reviews.ddtc.cmgdigital.com/api/repositories/?max-results=25&start=50
>>> Making HTTP GET request to http://reviews.ddtc.cmgdigital.com/api/repositories/?max-results=25&start=75
>>> Making HTTP GET request to http://reviews.ddtc.cmgdigital.com/api/repositories/?max-results=25&start=100
>>> Making HTTP GET request to http://reviews.ddtc.cmgdigital.com/api/repositories/?max-results=25&start=125
>>> Making HTTP GET request to http://reviews.ddtc.cmgdigital.com/api/review-requests/?status=pending&expand=draft&repository=None&from-user=jantman
>>> Got API Error 105 (HTTP code 400): One or more fields had errors
>>> Error data: {u'fields': {u'repository': [u"'None' is not an integer"]}, u'stat': u'fail', u'err': {u'msg': u'One or more fields had errors', u'code': 105}}
Traceback (most recent call last):
File "/usr/bin/rbt", line 9, in <module>
load_entry_point('RBTools==0.6.3', 'console_scripts', 'rbt')()
File "/usr/lib/python2.7/site-packages/rbtools/commands/main.py", line 134, in main
command.run_from_argv([RB_MAIN, command_name] + args)
File "/usr/lib/python2.7/site-packages/rbtools/commands/__init__.py", line 416, in run_from_argv
exit_code = self.main(*args) or 0
File "/usr/lib/python2.7/site-packages/rbtools/commands/post.py", line 769, in main
repository_info, api_root, api_client)
File "/usr/lib/python2.7/site-packages/rbtools/commands/post.py", line 411, in guess_existing_review_request_id
'%s: %s' % (user.username, e))
rbtools.commands.CommandError: Error getting review requests for user jantman: One or more fields had errors (HTTP 400, API Error 105)
repository: 'None' is not an integer
I'd like rbt to detect that the repository is 'None', and instead of trying the GET with "repository=None", it should print a human-readable error message stating that the repository cannot be found.