openwhisk icon indicating copy to clipboard operation
openwhisk copied to clipboard

Web function 400 Bad Request

Open QWQyyy opened this issue 2 years ago • 1 comments

Sir, I'm getting 400 badgateway error with my NodeJS function (NodeJS 16 runtime) My OpenWhisk cluster is fine, deployed based on K8s, no errors occur. image Of course, I can also directly use the wsk command line to trigger my test function: image This seems like everything is working fine, however I am unable to access my function via HTTP request, I have created the relevant POST request API and have HTTP access via the configured 31005 port: image image Therefore, I would like to ask how to adjust my system so that the following HTTP access errors will not occur. image My research team and I have encountered this obvious problem and would like to ask some experts for advice. @style95

QWQyyy avatar Jan 08 '24 09:01 QWQyyy

It seems you are using apigateway and I think it is not related to a webaction. If your action is not a webaction, you need proper credentials to invoke your function. Are you able to invoke your action without any API key?

And it just complains about the bad request, it's not easy to figure out the problem and reason with that. There might be some logs in apigateway, nginx, controllers, etc.

style95 avatar Jan 09 '24 23:01 style95