Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[packcheck] Does not exit cleanly on exception #14

Closed
thecodedrift opened this issue Nov 15, 2024 · 1 comment
Closed

[packcheck] Does not exit cleanly on exception #14

thecodedrift opened this issue Nov 15, 2024 · 1 comment

Comments

@thecodedrift
Copy link
Member

thecodedrift commented Nov 15, 2024

When using packCheck, errors are not thrown. They seem to be squelched by something in packCheck itself. Moving this throw new Error() above the check exits correctly. The error is silenced if thrown after packCheck, though the process is cleaned up correctly.

await packCheck(contents, {
  request: new Request("https://api.stripe.com/v1/payouts/po_1OaFDbEcg9tTZuTgNYmX0PKB", {
    method: "POST",
    headers: {
      authorization: `Basic ${stringToBase64("sk_test_4eC39HqLyjWDarjtT1zdp7dc")}`
    },
    body: formData
  }), 
  response: goodResponse.clone(),
  log(message) {
    console.log(message);
  },
});

throw new Error("HI")

Expected

Error: HI
    at <anonymous> (/home/jakobo/code/t2-p-stripe/test/check.ts:65:7)

Node.js v22.11.0
 ELIFECYCLE  Command failed with exit code 1.

Actual

no error emitted

@thecodedrift
Copy link
Member Author

Fixed with the release of https://github.com/taskless/packcheck

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant