ningyougang commented on code in PR #170:
URL:
https://github.com/apache/openwhisk-runtime-go/pull/170#discussion_r937220952
##########
openwhisk/runHandler.go:
##########
@@ -82,10 +82,14 @@ func (ap *ActionProxy) runHandler(w http.ResponseWriter, r
*http.Request) {
// check if the answer is an object map
var objmap map[string]*json.RawMessage
+ var objarray []interface{}
err = json.Unmarshal(response, &objmap)
if err != nil {
- sendError(w, http.StatusBadGateway, "The action did not return
a dictionary or array.")
- return
+ err = json.Unmarshal(response, &objarray)
Review Comment:
First, parse the result as json, if failed, parse the result as array.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]