Closed rabbah closed 4 years ago
The action invoke handler for a blocking request is: https://github.com/apache/openwhisk-client-js/blob/3cd025738f740080fc3d7b971f500a977914c568/lib/actions.js#L45-L52
But if the result of the activation is converted to a non-blocking activation, the result is an { activationId } only and this code will fail.
{ activationId }
A potential fix:
invoke (options) { options = options || {} if (options.blocking && options.result) { return super.invoke(options).then(result => { if (result.response) { return result.response.result } else return Promise.reject(result) }) } return super.invoke(options) }
Closed by #199.
The action invoke handler for a blocking request is: https://github.com/apache/openwhisk-client-js/blob/3cd025738f740080fc3d7b971f500a977914c568/lib/actions.js#L45-L52
But if the result of the activation is converted to a non-blocking activation, the result is an
{ activationId }
only and this code will fail.A potential fix: