Properly Handle Errors Received from Blocking Invocations (#1820)

- Display proper error message during a blocking invocation when result flag is being used
diff --git a/tests/src/system/basic/WskBasicTests.scala b/tests/src/system/basic/WskBasicTests.scala
index d77e3ad..ab959f7 100644
--- a/tests/src/system/basic/WskBasicTests.scala
+++ b/tests/src/system/basic/WskBasicTests.scala
@@ -357,6 +357,17 @@
             }
     }
 
+    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"