mirror of
https://github.com/actions/create-github-app-token.git
synced 2026-12-04 15:19:05 +00:00
test: include error detail in token revocation failure snapshot
Revert the redundant redaction in lib/post.js; the token is already masked via core.setSecret in main. The empty warning came from the mocked 401 response having no body, so give it one instead. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 61859778-5e53-432d-864c-8eddd0375f86
This commit is contained in:
1 parent
aeb28a5369
commit
a787c84cd8
2 files changed
+2
-4
No files matched your search
+1
-3
@@ -33,9 +33,7 @@ export async function post(core, request) {
|
||||
});
|
||||
core.info("Token revoked");
|
||||
} catch (error) {
|
||||
core.warning(
|
||||
`Token revocation failed: ${error.message.replaceAll(token, "***")}`,
|
||||
);
|
||||
core.warning(`Token revocation failed: ${error.message}`);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -28,6 +28,6 @@ mockPool
|
||||
authorization: "token secret123",
|
||||
},
|
||||
})
|
||||
.replyWithError(new Error("Internal Server Error"));
|
||||
.reply(500, "Internal Server Error");
|
||||
|
||||
await import("../post.js");
|
||||
Reference in new issue
Block a user