apache/airavata-mft

Rich error handling in CLI when communicating with MFT Server

DImuthuUpe opened this issue · 2 comments

Related to the discussion going in #93 (comment). Presently the connection failures to MFT service from the CLI throw a StatusCode.UNAVAILABLE exception which is generic to gRPC. We need to capture these errors and print user-friendly error messages and steps to debug the issue.

One example place that requires the fix: https://github.com/apache/airavata-mft/blob/master/python-cli/mft_cli/airavata_mft_cli/storage/__init__.py#L66

Yes. Unless you are running the daemon in some kind of HA configuration (e.g. using redundancy and Zookeeper, for example), you shouldn't ever assume that the daemon is running. The CLI should, at least, know that it failed to contact the daemon and give some sort of clear error message, like, "cannot contact daemon", imho.

@DImuthuUpe I will be looking into this, will post updates once I have them.
@slimandslam thank you for the suggestion.