dsub icon indicating copy to clipboard operation
dsub copied to clipboard

dstat: library should document error conditions

Open calbach opened this issue 8 years ago • 1 comments

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:

  • permission denied / not found on project
  • permission denied / not found on job

calbach avatar Oct 10 '17 23:10 calbach

+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....)

slagelwa avatar Mar 14 '19 17:03 slagelwa