Skip to content

Commit

Permalink
code clean
Browse files Browse the repository at this point in the history
  • Loading branch information
chronolaw committed Dec 28, 2022
1 parent 3c3cd98 commit 48aa8f8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions kong/db/schema/entities/routes.lua
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ local function validate_expression(id, exp)

local res, err = r:add_matcher(0, id, exp)
if not res then
return nil, err
return nil, "Router Expression failed validation: " .. err
end

return true
Expand Down Expand Up @@ -62,7 +62,7 @@ if kong_router_flavor == "expressions" then
fn = function(entity)
local ok, err = validate_expression(entity.id, entity.expression)
if not ok then
return nil, "Router Expression failed validation: " .. err
return nil, err
end

return true
Expand Down Expand Up @@ -161,7 +161,7 @@ else
local exp = _get_expression(entity)
local ok, err = validate_expression(entity.id, exp)
if not ok then
return nil, "Router Expression failed validation: " .. err
return nil, err
end
end

Expand Down

0 comments on commit 48aa8f8

Please sign in to comment.