fix: kickOut takes a reason
error rather than a message
string
#1567
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Prior to this PR we have the following line of code:
The problem with this pattern of code is that
err
had an associated stack trace, whereaserr.message
is just a string. Currently we're not doing anything to correlate stack traces of sent errors with received errors, but I'm hoping to change that. This PR is in anticipation of that change.I adopt the naming convention associated with a promise's rejection reason, which is normally an error object, of calling it a
reason
. I changekickOut
to accept such areason
error rather than amessage
string. I fix the types, including noticing and fixing a bug in the notifier's type ofupdater.fail
. This was declared with the sameT
template variable as for the values being reported, which was always wrong. It is now specifically areason: Error
.Where the zcfSeat does an eventual send of
kickOut
to the zoeSeat, it also hardens the reason. The marshal layer transmits simple hardened errors. The marshal layer currently does not to enable recovery of the stack, but that's where I'm going.This came up when @michaelfig and I were working on upgrading pegasus to the new Zoe.