From d42ee5453d989a4b7cf503a0ab98aac780378b2e Mon Sep 17 00:00:00 2001
From: James Dubee <jwdubee@us.ibm.com>
Date: Thu, 9 Feb 2017 10:01:20 -0500
Subject: [PATCH] Properly Handle Errors Received from Blocking Invocations
 (#1820)

- Display proper error message during a blocking invocation when result flag is being used
---
 tests/src/system/basic/WskBasicTests.scala | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/tests/src/system/basic/WskBasicTests.scala b/tests/src/system/basic/WskBasicTests.scala
index d77e3ad4..ab959f7a 100644
--- a/tests/src/system/basic/WskBasicTests.scala
+++ b/tests/src/system/basic/WskBasicTests.scala
@@ -357,6 +357,17 @@ class WskBasicTests
             }
     }
 
+    it should "create and invoke a blocking action resulting in an application error response" in withAssetCleaner(wskprops) {
+        (wp, assetHelper) =>
+            val name = "applicationError3"
+            assetHelper.withCleaner(wsk.action, name) {
+                (action, _) => action.create(name, Some(TestUtils.getTestActionFilename("applicationError3.js")))
+            }
+
+            wsk.action.invoke(name, blocking = true, result = true, expectedExitCode = 246)
+              .stderr.parseJson.asJsObject shouldBe JsObject("error" -> JsBoolean(true))
+    }
+
     it should "create and invoke a blocking action resulting in an failed promise" in withAssetCleaner(wskprops) {
         (wp, assetHelper) =>
             val name = "errorResponseObject"
-- 
GitLab