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

fix(orchestration): errors should have error messages #9593

Merged
merged 2 commits into from
Jun 28, 2024

Conversation

erights
Copy link
Member

@erights erights commented Jun 26, 2024

closes: #XXXX
refs: #9519

Description

While trying to debug #9519 , I'm seeing errors like

Error#20: {"type":1,"data":"CmgKIy9jb3Ntb3Muc3Rha2luZy52MWJldGExLk1zZ0RlbGVnYXRlEkEKGFVOUEFSU0FCTEVfQ0hBSU5fQUREUkVTUxISYWdvcmljMXZhbG9wZXJmdWZ1GhEKBXVmbGl4EggxMDAwMDAwMA==","memo":""}
  at parseTxPacket (file:///Users/markmiller/src/ongithub/agoric/agoric-sdk/packages/orchestration/src/utils/packet.js:87:14)

which only has the data without any message text saying what's wrong with the data. While fixing, also switched to a Fail to give us control over redaction. I made the conservative assumption that to not unredact the actual packet data, because I don't know why it should be public on the error even in non-debugging scenarios. If it should be unredacted, I can easily change to ${q(response)}. Reviewers, please advise.

Note that either way, the unredacted info will still show up in error logs, as above, and will still even show up on the error object in standard debugging configurations.

Security Considerations

Possibly repaired an unintended disclosure of info that should have been redacted, though the main motivation was adding an informative error message.

Scaling Considerations

none

Documentation Considerations

none

Testing Considerations

none

Upgrade Considerations

none

@erights erights self-assigned this Jun 26, 2024
Copy link

cloudflare-workers-and-pages bot commented Jun 26, 2024

Deploying agoric-sdk with  Cloudflare Pages  Cloudflare Pages

Latest commit: 7d51692
Status: ✅  Deploy successful!
Preview URL: https://85df1d4d.agoric-sdk.pages.dev
Branch Preview URL: https://markm-better-error-message.agoric-sdk.pages.dev

View logs

@erights erights force-pushed the markm-better-error-message branch from 5df86c8 to 6fcccfa Compare June 26, 2024 20:00
@erights erights marked this pull request as ready for review June 26, 2024 20:00
@erights erights added the automerge:squash Automatically squash merge label Jun 26, 2024
@0xpatrickdev
Copy link
Member

0xpatrickdev commented Jun 26, 2024

Thanks, this is much clearer. Also confirming your choice on the redaction - if we are able to see the response in debug logs that's sufficient.

@erights erights added automerge:squash Automatically squash merge and removed automerge:squash Automatically squash merge labels Jun 27, 2024
@mergify mergify bot merged commit 5b2d338 into master Jun 28, 2024
77 checks passed
@mergify mergify bot deleted the markm-better-error-message branch June 28, 2024 05:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
automerge:squash Automatically squash merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants