Clear message in case of function/pod failure (#1069)

* Clear message in case of function/pod failure
* Added err handling while getting pods
* Using multierror instead of strings
This commit is contained in:
Vishal
2019-01-23 22:26:13 +08:00
committed by Ta-Ching Chen
parent 5ff875b1ac
commit 101e188f41
2 changed files with 20 additions and 3 deletions
+1 -1
View File
@@ -803,7 +803,7 @@ func fnTest(c *cli.Context) error {
body, err := ioutil.ReadAll(resp.Body)
util.CheckErr(err, "read log response from pod")
fmt.Printf("Error calling function %s: %d %s", fnName, resp.StatusCode, string(body))
fmt.Printf("Error calling function %s: %d; Please try again or fix the error: %s", fnName, resp.StatusCode, string(body))
defer resp.Body.Close()
err = printPodLogs(c)
if err != nil {