[Webkit-unassigned] [Bug 271608] New: Make webkitbugspy/bugzilla.py emit more-helpful error message when it gets 101 response
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Sun Mar 24 10:08:14 PDT 2024
https://bugs.webkit.org/show_bug.cgi?id=271608
Bug ID: 271608
Summary: Make webkitbugspy/bugzilla.py emit more-helpful error
message when it gets 101 response
Product: WebKit
Version: WebKit Nightly Build
Hardware: Unspecified
OS: Unspecified
Status: NEW
Severity: Normal
Priority: P2
Component: Tools / Tests
Assignee: webkit-unassigned at lists.webkit.org
Reporter: mike at w3.org
Today I ran “git webkit pr” while Ling Ho happen to have Bugzilla down for a few minutes — which seems to have caused the script to run into the following webkitbugspy/bugzilla.py code:
if response.json().get('code') == 101:
sys.stderr.write("{}\n".format(response.json().get('message')))
return None
But when that code was hit, I got a relatively unhelpful/unclear error message:
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
And that seems to be due to the fact that bugzilla.py returns None in the code cited above causes other code to get hit which expects some actual object other than None, and doesn’t gracefully handle getting None instead.
So it’d be preferable to have webkitbugspy/bugzilla.py do something more helpful here. Maybe rather than returning None, it should be made to just sys.exit(1) right there — after emiting a message like “101 response received:. Is Bugzilla down?” or whatever.
Or else I guess instead the existing self.populate() callers could be made to check the return value, and if it’s None, they should sys.exit(1) there with something like “Failed to get necessary data from Bugzilla. Is Bugzilla down?” or some such.
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20240324/24506858/attachment.htm>
More information about the webkit-unassigned
mailing list