(enhancement): Surface inner exception when secret:bulk upload command fails#227
Conversation
|
Does this actually resolve the error surfacing? I have a feeling that Wrangler is swallowing the error before it even gets to the wrangler-action. |
You're right in the sense that if wrangler cli itself is swallowing the error, this won't help. |
|
I think in this case the error will be swallowed by |
Oh I see! Thank you, was not aware of this. I'll update the PR |
|
Sorry, I got mixed up. Adding listeners to capture output from |
1000hz
left a comment
There was a problem hiding this comment.
I'm a little suspicious that exec() isn't actually executing during some of the reports of failed secret uploads, so I think this PR will be helpful to narrow down what's causing things to fail in case it's indeed happening before we actually execute wrangler.
Please add a changeset by running npx changeset describing this change.
src/index.ts
Outdated
| } catch (err: unknown) { | ||
| if (err instanceof Error) { | ||
| error(err.message); | ||
| debug(`wrangler secret:bulk error stack: ${err.stack}`); |
There was a problem hiding this comment.
| debug(`wrangler secret:bulk error stack: ${err.stack}`); | |
| debug(err.stack); |
|
Thanks again for the CR, definitely learned a few things about exec and it's output. If you'd like I can replace |
Resolves #226