Hey there,
we've just run into an unexpected behavior with Kong (latest version 0.8.3): When posting a rather short request JSON object to the proxied API like the following, everything works as expected and we get a 200 OK status and the expected JSON response.
The request object that works fine is this one:
{
"docId": "the-who-live-in-concert",
"text": "When Who played Tommy in Columbus, Pete was at his best."
}
The error.log shows the following entry:
*121 lua entry thread aborted: runtime error: /usr/local/share/lua/5.1/kong/tools/utils.lua:172: bad argument #1 to 'pairs' (table expected, got nil)
stack traceback:
coroutine 0:
[C]: in function 'pairs'
/usr/local/share/lua/5.1/kong/tools/utils.lua:172: in function 'retrieve_parameters'
/usr/local/share/lua/5.1/kong/plugins/oauth2/access.lua:359: in function 'parse_access_token'
/usr/local/share/lua/5.1/kong/plugins/oauth2/access.lua:412: in function 'execute'
/usr/local/share/lua/5.1/kong/plugins/oauth2/handler.lua:12: in function 'access'
/usr/local/share/lua/5.1/kong.lua:188: in function 'access'
access_by_lua(nginx.conf:98):2: in function <access_by_lua(nginx.conf:98):1>, client: 139.19.106.189, server: _, request: "POST /entitylinking/v1beta1/analyze?access_token=ACCESS_TOKEN HTTP/1.1", host: "
api.ambiverse.com"
Initially, we suspected that the request-size-limiting plugin is misconfigured, but this seems not to be the case. Even when disabling it, the issue persists.
Please advise.
Best regards,
Daniel