New issue
Advanced search Search tips

Issue 923194 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Today
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 1
Type: Bug



Sign in to add a comment

Add better error reporting when using prpc binary with buildbucket's v2 api

Project Member Reported by bpastene@chromium.org, Jan 18 (5 days ago)

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?

 

Comment 1 by no...@chromium.org, Jan 18 (5 days ago)

Labels: -Pri-3 Pri-1
Owner: no...@chromium.org
Status: Assigned (was: Untriaged)
I agree it is quite annoying 

Comment 2 by no...@chromium.org, Jan 18 (4 days ago)

Status: Started (was: Assigned)
Project Member

Comment 3 by bugdroid1@chromium.org, 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

Comment 4 by no...@chromium.org, Today (12 hours ago)

Status: Fixed (was: Started)

Sign in to add a comment