diff --git a/changelog/unreleased/kong/fix-error-message-print.yml b/changelog/unreleased/kong/fix-error-message-print.yml new file mode 100644 index 000000000000..c3e87303f08b --- /dev/null +++ b/changelog/unreleased/kong/fix-error-message-print.yml @@ -0,0 +1,3 @@ +message: print error message correctly when plugin fails +type: bugfix +scope: Core diff --git a/kong/plugins/aws-lambda/handler.lua b/kong/plugins/aws-lambda/handler.lua index 2e1b78002d03..78699df1d4ad 100644 --- a/kong/plugins/aws-lambda/handler.lua +++ b/kong/plugins/aws-lambda/handler.lua @@ -181,7 +181,7 @@ function AWSLambdaHandler:access(conf) local content = res.body if res.status >= 400 then - return error(content) + return error(content.Message) end -- TRACING: set KONG_WAITING_TIME stop