apache/openwhisk-runtime-nodejs

report more explicit error message on attempted re-init

Closed this issue · 1 comments

This nodejs runtime does not permit a re-init while running a function but responds with an error that could be confusing.

{"error":"Internal system error: system not ready, status: running"}

As part of normalizing all the runtimes to handle re-init consistently, change the error message matching the Java runtime (this will be adopted in the upstream runtime tests which will be extended to include a test for re-init, where the first init is expected to succeed but the second should fail. The action proxy will reject the request with status code other than 200 OK).

[1] https://github.com/apache/incubator-openwhisk-runtime-java/blob/3657b3889fd1ce03581184fcb07766a8c897a4d8/java8/proxy/src/main/java/openwhisk/java/action/Proxy.java#L72-L75