Status: New
Owner: ----
Labels: Type-Defect Priority-Medium

New issue 3687 by ja...@jasonantman.com: rbt - helpful error message when repository cannot be found
https://code.google.com/p/reviewboard/issues/detail?id=3687

*** READ THIS BEFORE POSTING!
***
*** You must complete this form in its entirety, or your bug report will be
*** rejected.
***
*** If you have a security issue to report, please send it confidentially
to
*** secur...@reviewboard.org. Posting security-related issues to this bug
*** tracker causes us to have to do an emergency release.
***
*** For customer support, please post to reviewbo...@googlegroups.com
***
*** If you have a patch, please submit it to
http://reviews.reviewboard.org/
***
*** This bug tracker is public. Please check that any logs or other
information
*** that you include has been stripped of confidential information.


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.

--
You received this message because this project is configured to send all issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings

--
You received this message because you are subscribed to the Google Groups 
"reviewboard-issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to reviewboard-issues+unsubscr...@googlegroups.com.
To post to this group, send email to reviewboard-issues@googlegroups.com.
Visit this group at http://groups.google.com/group/reviewboard-issues.
For more options, visit https://groups.google.com/d/optout.

Reply via email to