Skip to content

Commit

Permalink
fix(*) popup errors from lower functions
Browse files Browse the repository at this point in the history
  • Loading branch information
fffonion committed Jun 1, 2021
1 parent 08cc889 commit a19e9c8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions lib/resty/acme/autossl.lua
Original file line number Diff line number Diff line change
Expand Up @@ -327,11 +327,11 @@ function AUTOSSL.init(autossl_config, acme_config)
if autossl_config.domain_key_paths[typ] then
local domain_key_f, err = io.open(autossl_config.domain_key_paths[typ])
if err then
error(err)
error("failed to open domain_key: " .. err)
end
local domain_key_pem, err = domain_key_f:read("*a")
if err then
error(err)
error("failed to read domain key: " .. err)
end
domain_key_f:close()
-- sanity check of the pem content, will error out if it's invalid
Expand All @@ -345,7 +345,7 @@ function AUTOSSL.init(autossl_config, acme_config)
local client, err = acme.new(acme_config)

if err then
error(err)
error("failed to initialize ACME client: " .. err)
end

AUTOSSL.client = client
Expand All @@ -358,14 +358,14 @@ function AUTOSSL.init_worker()
local storagemod = require(AUTOSSL.config.storage_adapter)
local storage, err = storagemod.new(AUTOSSL.config.storage_config)
if err then
error(err)
error("failed to initialize storage: " .. err)
end
AUTOSSL.storage = storage

if not AUTOSSL.config.account_key_path then
local account_key, err = AUTOSSL.load_account_key_storage()
if err then
error(err)
error("failed to load account key from storage: " .. err)
end
local ok, err = AUTOSSL.client:set_account_key(account_key)
if err then
Expand Down
2 changes: 1 addition & 1 deletion lib/resty/acme/client.lua
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ function _M:jws(url, payload, nonce)
local err
nonce, err = self:new_nonce()
if err then
return nil, "can't get new nonce from acme server"
return nil, "can't get new nonce from acme server: " .. err
end
end

Expand Down

0 comments on commit a19e9c8

Please sign in to comment.