DataBiosphere / dsub

Open-source command-line tool to run batch computing tasks and workflows on backend services such as Google Cloud.
Apache License 2.0
262 stars 45 forks source link

dstat: library should document error conditions #79

Open calbach opened 6 years ago

calbach commented 6 years ago

Currently, HttpErrors will propagate up the stack through the dstat library when using the Google provider. Would be good to centralize error condition handling in the dstat library itself and then document error types from there.

For example:

slagelwa commented 5 years ago

+1

I believe this is related, if not the same issue. When I issue a dsub command with the wrong project id using the v2-google provider I don't get a very informative error message:

2019-03-14 17:48:24.276694: Exception HttpError: <HttpError 403 when requesting https://genomics.googleapis.com/v2alpha1/pipelines:run?alt=json returned "The caller does not have permission">

When I use the deprecated google api, I get a much more descriptive error message:

googleapiclient.errors.HttpError: <HttpError 404 when requesting https://genomics.googleapis.com/v1alpha2/pipelines:run?alt=json returned "Project id "XXXXXXX" not found">

(Spent a some time trying to figure out why dsub wasn't working and it turned out to be a typo in the project id instead of what I originally suspected, a permissions issues using a shared VPC. Grrrr....)