Skip to content

Commit 6c9760f

Browse files
authored
fix(autossl) log the errors on the list certificates request (#110)
Co-authored-by: Nizar Malangadan <[email protected]>
1 parent d7145d0 commit 6c9760f

File tree

6 files changed

+10
-6
lines changed

6 files changed

+10
-6
lines changed

lib/resty/acme/autossl.lua

+5-1
Original file line numberDiff line numberDiff line change
@@ -314,7 +314,11 @@ function AUTOSSL.check_renew(premature)
314314
return
315315
end
316316

317-
local keys = AUTOSSL.storage:list(domain_cache_key_prefix)
317+
local keys, err = AUTOSSL.storage:list(domain_cache_key_prefix)
318+
if err then
319+
log(ngx_ERR, "failed to get the list of certificates from storage, error: ", err)
320+
return
321+
end
318322
for _, key in ipairs(keys) do
319323
local serialized, err = AUTOSSL.storage:get(key)
320324
if err or not serialized then

lib/resty/acme/storage/consul.lua

+1-1
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ function _M:list(prefix)
152152
end
153153
end
154154
end
155-
return ret
155+
return ret, nil
156156
end
157157

158158
return _M

lib/resty/acme/storage/etcd.lua

+1-1
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ function _M:list(prefix)
8888
end
8989
end
9090
end
91-
return ret
91+
return ret, nil
9292
end
9393

9494
return _M

lib/resty/acme/storage/file.lua

+1-1
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ function _M:list(prefix)
149149
end
150150
::nextfile::
151151
end
152-
return files
152+
return files, nil
153153
end
154154

155155
return _M

lib/resty/acme/storage/shm.lua

+1-1
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ function _M:list(prefix)
5151
end
5252
end
5353
end
54-
return keys
54+
return keys, nil
5555
end
5656

5757
return _M

lib/resty/acme/storage/vault.lua

+1-1
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,7 @@ function _M:list(prefix)
268268
end
269269
end
270270
end
271-
return ret
271+
return ret, nil
272272
end
273273

274274
return _M

0 commit comments

Comments
 (0)