Bug #3415

[SDKs] Report the server-provided error message when API calls fail in Python SDK

Added by Tom Clegg almost 6 years ago. Updated almost 6 years ago.

Status:
Resolved
Priority:
Normal
Assigned To:
Brett Smith
Category:
SDKs
Target version:
Start date:
08/05/2014
Due date:
% Done:

100%

Estimated time:
(Total: 0.00 h)
Story points:
0.5

Description

Example (the unreported message here is "uuid does not match hash of manifest_text"):

2014-07-29_20:53:33 qr1hi-8i9sb-jbupkux1bf96e56 6996 0 stderr 
2014-07-29_20:53:33 qr1hi-8i9sb-jbupkux1bf96e56 6996 0 stderr Traceback (most recent call last):
2014-07-29_20:53:33 qr1hi-8i9sb-jbupkux1bf96e56 6996 0 stderr   File "/tmp/crunch-src/crunch_scripts/split-fastq.py", line 80, in <module>
2014-07-29_20:53:33 qr1hi-8i9sb-jbupkux1bf96e56 6996 0 stderr     arvados.current_task().set_output(put_manifest(manifest_text, [arvados.getjobparam('reads')]))
2014-07-29_20:53:33 qr1hi-8i9sb-jbupkux1bf96e56 6996 0 stderr   File "/tmp/crunch-src/crunch_scripts/split-fastq.py", line 27, in put_manifest
2014-07-29_20:53:33 qr1hi-8i9sb-jbupkux1bf96e56 6996 0 stderr     'manifest_text': crm.manifest_text()
2014-07-29_20:53:33 qr1hi-8i9sb-jbupkux1bf96e56 6996 0 stderr   File "/usr/local/lib/python2.7/dist-packages/google_api_python_client-1.2-py2.7.egg/oauth2client/util.py", line 132, in positional_wrapper
2014-07-29_20:53:33 qr1hi-8i9sb-jbupkux1bf96e56 6996 0 stderr     return wrapped(*args, **kwargs)
2014-07-29_20:53:33 qr1hi-8i9sb-jbupkux1bf96e56 6996 0 stderr   File "/usr/local/lib/python2.7/dist-packages/google_api_python_client-1.2-py2.7.egg/apiclient/http.py", line 723, in execute
2014-07-29_20:53:33 qr1hi-8i9sb-jbupkux1bf96e56 6996 0 stderr     raise HttpError(resp, content, uri=self.uri)
2014-07-29_20:53:33 qr1hi-8i9sb-jbupkux1bf96e56 6996 0 stderr apiclient.errors.HttpError: <HttpError 422 when requesting https://qr1hi.arvadosapi.com/arvados/v1/collections?alt=json returned "Unprocessable Entity">

Subtasks

Task #3478: Review 3415-py-sdk-api-errors-wipResolvedBrett Smith

Associated revisions

Revision 20f944be (diff)
Added by Tom Clegg almost 6 years ago

Report validation error messages in server log. refs #3415

Revision 4eafb2b7
Added by Brett Smith almost 6 years ago

Merge branch '3415-py-sdk-api-errors-wip'

Refs #3415. Closes #3478.

History

#1 Updated by Tom Clegg almost 6 years ago

  • Target version set to 2014-08-06 Sprint

#2 Updated by Tom Clegg almost 6 years ago

  • Status changed from New to In Progress

#3 Updated by Tom Clegg almost 6 years ago

  • Subject changed from [API] Stop using save!() because it does not return a useful message with the exception. to [API] Report the server-provided error message when API calls fail in Python SDK

#4 Updated by Tom Clegg almost 6 years ago

  • Status changed from In Progress to New

#5 Updated by Tom Clegg almost 6 years ago

  • Description updated (diff)

#6 Updated by Brett Smith almost 6 years ago

  • Subject changed from [API] Report the server-provided error message when API calls fail in Python SDK to [SDKs] Report the server-provided error message when API calls fail in Python SDK
  • Category set to SDKs

#7 Updated by Brett Smith almost 6 years ago

  • Status changed from New to In Progress
  • Assigned To set to Brett Smith

#8 Updated by Radhika Chippada almost 6 years ago

Things looked good to me. LGTM

#9 Updated by Brett Smith almost 6 years ago

  • Status changed from In Progress to Resolved

Tom says that he considers this story resolved with the merge.

Also available in: Atom PDF