Surface inner exception when secret:bulk upload command fails

This commit is contained in:
Adishwar Rishi 2024-01-03 13:07:49 +11:00
parent 2521ec00cc
commit 7e684fbad9
No known key found for this signature in database
2 changed files with 8 additions and 3 deletions

4
package-lock.json generated
View file

@ -1,12 +1,12 @@
{ {
"name": "wrangler-action", "name": "wrangler-action",
"version": "3.3.2", "version": "3.4.0",
"lockfileVersion": 3, "lockfileVersion": 3,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "wrangler-action", "name": "wrangler-action",
"version": "3.3.2", "version": "3.4.0",
"license": "MIT OR Apache-2.0", "license": "MIT OR Apache-2.0",
"dependencies": { "dependencies": {
"@actions/core": "^1.10.1", "@actions/core": "^1.10.1",

View file

@ -5,6 +5,7 @@ import {
endGroup as originalEndGroup, endGroup as originalEndGroup,
error as originalError, error as originalError,
info as originalInfo, info as originalInfo,
debug,
startGroup as originalStartGroup, startGroup as originalStartGroup,
setFailed, setFailed,
setOutput, setOutput,
@ -204,7 +205,11 @@ async function uploadSecrets() {
), ),
), ),
}); });
} catch (err) { } catch (err: unknown) {
if (err instanceof Error) {
error(err.message);
debug(`Secret upload error stack: ${err.stack}`);
}
throw new Error(`Failed to upload secrets.`); throw new Error(`Failed to upload secrets.`);
} finally { } finally {
endGroup(); endGroup();