Skip to content

Commit 5cbdb3d

Browse files
committed
base-acme-client.js
- add getNextNonce export - rename `newDirectoryAsync` to `newDirectory` (its still async) - rename `newNonceAsync` to `newNonce` (its still async) - changes to how errors/exceptions are returned - errors have `error.type` of `bac:failed:methodName` - exceptions have `error.type` of `bac:exception:methodName` - inside `error.details` is the message/exception - errors and exceptions from bac have an `error.status` of `777777` or similar
1 parent 0330ddf commit 5cbdb3d

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

base-acme-client.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ export async function newDirectory(mainDirectoryUrl) {
4040
const response = await fetchAndRetryUntilOk(mainDirectoryUrl, { method: METHOD_GET });
4141

4242
if (response) {
43-
return { answer: response.ok ? { directory: await response.json() } : { error: await response.json() } };
43+
return { answer: { [response.ok ? 'directory' : 'error']: await response.json() } };
4444
}
4545

4646
return notCompletedError("newDirectory");

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "base-acme-client",
33
"author": "FirstTimeEZ",
4-
"version": "22.0.8",
4+
"version": "22.0.9",
55
"description": "Implementation of the Automatic Certificate Management Environment in Javascript (RFC8555)",
66
"main": "base-acme-client.js",
77
"type": "module",

0 commit comments

Comments
 (0)