Skip to content

Commit

Permalink
fix(autossl) log the errors on the list certificates request (#110)
Browse files Browse the repository at this point in the history
Co-authored-by: Nizar Malangadan <[email protected]>
  • Loading branch information
nizar-m and nizar-m authored Feb 28, 2024
1 parent d7145d0 commit 6c9760f
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 6 deletions.
6 changes: 5 additions & 1 deletion lib/resty/acme/autossl.lua
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,11 @@ function AUTOSSL.check_renew(premature)
return
end

local keys = AUTOSSL.storage:list(domain_cache_key_prefix)
local keys, err = AUTOSSL.storage:list(domain_cache_key_prefix)
if err then
log(ngx_ERR, "failed to get the list of certificates from storage, error: ", err)
return
end
for _, key in ipairs(keys) do
local serialized, err = AUTOSSL.storage:get(key)
if err or not serialized then
Expand Down
2 changes: 1 addition & 1 deletion lib/resty/acme/storage/consul.lua
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ function _M:list(prefix)
end
end
end
return ret
return ret, nil
end

return _M
2 changes: 1 addition & 1 deletion lib/resty/acme/storage/etcd.lua
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ function _M:list(prefix)
end
end
end
return ret
return ret, nil
end

return _M
2 changes: 1 addition & 1 deletion lib/resty/acme/storage/file.lua
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ function _M:list(prefix)
end
::nextfile::
end
return files
return files, nil
end

return _M
2 changes: 1 addition & 1 deletion lib/resty/acme/storage/shm.lua
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ function _M:list(prefix)
end
end
end
return keys
return keys, nil
end

return _M
2 changes: 1 addition & 1 deletion lib/resty/acme/storage/vault.lua
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ function _M:list(prefix)
end
end
end
return ret
return ret, nil
end

return _M

0 comments on commit 6c9760f

Please sign in to comment.