Tags: cockroachdb/errors
Tags
Remove all go 1.20 features from test usage This commit removes all test code that references: - go 1.20 `errors.Join` function. - go 1.20 multi-cause `fmt.Errorf` that contain multiple `%w` formatting directives. This commit also reverts go.mod to use 1.17 to match the state of the codebase from before the go 1.20 upgrade. This allows older codebases to upgrade to a version of this library that can encode/decode multi-cause errors from newer versions without completely discarding the child cause error info.
barriers: use a redactable string as message payload This changes the implementation of barriers to use a redactable string as message payload. This makes it possible to include more details (all the safe parts of the message payload) when printing out the barrier cause. In order to ensure safety when interacting with previous versions of the library without this logic, we must be careful to wrap/escape the message string received when decoding a network error. To force this additional wrapping, we rename the error type so that it can get a separate decode function.
PreviousNext