Add better error reporting when using prpc binary with buildbucket's v2 api |
|||
Issue description
I ran the following command:
echo '{"requests": [{"get_build": {"id": 8931889534925469408}]}}' | prpc call cr-buildbucket.appspot.com buildbucket.v2.Builds.Batch
It gave me a rather unhelpful "rpc error: code = InvalidArgument desc = Error parsing request" error. I had to view buildbucket server logs to learn that it wasn't valid json. The server logs pointed to "Failed to decode request: Failed to load JSON: Expecting ',' delimiter: line 1 column 56 (char 55)."
I had mistakenly swapped a "]" with a "}", but I shouldn't have had to view cloud logging to learn that. Couldn't the server have reported that in the response?
,
Jan 18
(4 days ago)
,
Jan 18
(4 days ago)
The following revision refers to this bug: https://chromium.googlesource.com/infra/luci/luci-py.git/+/67aaa27b22219d2ff21c5ac633f664bf23187483 commit 67aaa27b22219d2ff21c5ac633f664bf23187483 Author: Nodir Turakulov <nodir@google.com> Date: Fri Jan 18 16:52:50 2019 [prpc] Return parse error message When failing to parse request, include the exception message in the response. Bug: 923194 Change-Id: I228fd22a1263e45e3dba0bf3f9cd42386bde7bbd Reviewed-on: https://chromium-review.googlesource.com/c/1421857 Reviewed-by: Ben Pastene <bpastene@chromium.org> Commit-Queue: Nodir Turakulov <nodir@chromium.org> [modify] https://crrev.com/67aaa27b22219d2ff21c5ac633f664bf23187483/appengine/components/components/prpc/server.py
,
Today
(12 hours ago)
|
|||
►
Sign in to add a comment |
|||
Comment 1 by no...@chromium.org
, Jan 18 (5 days ago)Owner: no...@chromium.org
Status: Assigned (was: Untriaged)