From 70ffdff5132132e58fe40bfffe684fd687a30c59 Mon Sep 17 00:00:00 2001 From: Robin Xiang Date: Thu, 12 Sep 2024 10:00:30 +0800 Subject: [PATCH] fix(pdk.service): corrects the error message in `pdk.service.set_retries` when the argument provided is invalid FTI-6222 --- changelog/unreleased/kong/fix-pdk-service-errmsg.yml | 3 +++ kong/pdk/service.lua | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) create mode 100644 changelog/unreleased/kong/fix-pdk-service-errmsg.yml diff --git a/changelog/unreleased/kong/fix-pdk-service-errmsg.yml b/changelog/unreleased/kong/fix-pdk-service-errmsg.yml new file mode 100644 index 000000000000..1468dbaea215 --- /dev/null +++ b/changelog/unreleased/kong/fix-pdk-service-errmsg.yml @@ -0,0 +1,3 @@ +message: "**PDK**: fix the error message in kong.pdk.service.set_retries" +scope: PDK +type: bugfix diff --git a/kong/pdk/service.lua b/kong/pdk/service.lua index 182c771753dd..c936cfc14cb8 100644 --- a/kong/pdk/service.lua +++ b/kong/pdk/service.lua @@ -147,7 +147,7 @@ local function new() error("retries must be an integer", 2) end if retries < 0 or retries > 32767 then - error("port must be an integer between 0 and 32767: given " .. retries, 2) + error("retries must be an integer between 0 and 32767: given " .. retries, 2) end local ctx = ngx.ctx