diff --git a/apisix/plugins/opa/helper.lua b/apisix/plugins/opa/helper.lua index 59e3a8c35cca..b798d9ac97eb 100644 --- a/apisix/plugins/opa/helper.lua +++ b/apisix/plugins/opa/helper.lua @@ -37,7 +37,7 @@ end local function get_body_for_request() local original_body, err = core.request.get_body() if err ~= nil then - error("opa - failed to get request body: " .. err) + return nil, "failed to get request body: " .. err end if original_body == nil then return nil