Skip to content

Releases: cockroachdb/errors

v1.11.3

28 May 16:34
698c58c
Compare
Choose a tag to compare

What's Changed

New Contributors

Full Changelog: v1.11.2...v1.11.3

v1.11.2

24 May 19:05
bafdccd
Compare
Choose a tag to compare

What's Changed

New Contributors

Full Changelog: v1.11.1...v1.11.2

v1.11.1

28 Aug 18:01
c062e01
Compare
Choose a tag to compare

No functionality or API changes in this version. We downgrade the go version requirement in go.mod to 1.19 since only tests actually use go 1.20 APIs.

This makes the 1.11.1 version suitable for deploying with projects that are not yet on go 1.20 but require forward compatibility with multi-cause errors encoded by version 1.11.0 or greater of this library. (We had previously released 1.10.1 for this purpose, but that wasn't necessary in retrospect.)

What's Changed

New Contributors

Full Changelog: v1.11.0...v1.11.1

v1.11.0 go 1.20 compatibility and multi-cause error support

24 Aug 22:05
ca59e56
Compare
Choose a tag to compare

This release adds support for go 1.20 and its multi-cause errors introduced into the errors API.

Multi-cause errors are now supported

These were introduced in go 1.20

  • Errors with multiple causes are encoded/decoded over the network along with their error causal tree
  • Errors with multiple causes are formatted appropriately when printed verbosely
  • Errors with multiple causes are formatted appropriately in Sentry reports
  • Is and As support is now compatible with multi-cause errors (matching stdlib changes)

The public API gains a number of new functions

See the README for details.

  • Join adds a drop-in replacement for the new stdlib function to combine an arbitrary number of errors into one (Thank you @StevenACoffman)
  • Ability to register multi-cause encoders/decoders for custom error types
  • Ability to register encoders for custom error types that override the error messages of their causal chain (previously, this behavior was inferred in the decoder and could result in unintended formatting behavior)

A bug was fixed in the formatting of wrapped errors that resulted in only the innermost cause getting printed (#113)

What's Changed

New Contributors

Full Changelog: v1.10.0...v1.11.0

v1.10.1 multi-cause error support without requiring go 1.20

24 Aug 22:09
Compare
Choose a tag to compare

This release is identical to v1.11.0 except that it remains compatible with pre 1.20 go versions. This allows for rolling out support in your system in a backwards compatible manner, allowing applications that are not using go 1.20 to decode and interpret multi-cause errors generated by newer versions of this library.


This release adds support for go 1.20 and its multi-cause errors introduced into the errors API.

Multi-cause errors are now supported

These were introduced in go 1.20

  • Errors with multiple causes are encoded/decoded over the network along with their error causal tree
  • Errors with multiple causes are formatted appropriately when printed verbosely
  • Errors with multiple causes are formatted appropriately in Sentry reports
  • Is and As support is now compatible with multi-cause errors (matching stdlib changes)

The public API gains a number of new functions

See the README for details.

  • Join adds a drop-in replacement for the new stdlib function to combine an arbitrary number of errors into one (Thank you @StevenACoffman)
  • Ability to register multi-cause encoders/decoders for custom error types
  • Ability to register encoders for custom error types that override the error messages of their causal chain (previously, this behavior was inferred in the decoder and could result in unintended formatting behavior)

A bug was fixed in the formatting of wrapped errors that resulted in only the innermost cause getting printed (#113)

What's Changed

New Contributors

Full Changelog: v1.10.0...v1.11.0

v1.10.0 Dependency updates, gRPC API and redaction improvements

24 Aug 20:45
a95e895
Compare
Choose a tag to compare

Add status.Errorf to the gRPC Wrappers #110

This change updates our gRPC API to match the grpc-go status package more closely.

Update the redact dependency. #111

This release upgrade the cockroachdb/redact dependency in this project.
The upgrade leads to improved empty string handling in redacted error outputs. Details can be seen in the data driven test changes.

Bug fix and fewer dependencies

24 Jan 21:51
@knz knz
3fdcae9
Compare
Choose a tag to compare

This releases fixes a small bug in errors.Is and greatly simplifies the set of indirect dependencies via go.mod.

This is useful because some of the older (now-unused) dependencies were reported as "vulnerable" by some security checking tools.

Better Sentry reports

09 Mar 10:39
@knz knz
feb9d32
Compare
Choose a tag to compare

This release enhances the composition of Sentry reports to reveal more details about errors. In particular, it does a better job of revealing information that was always redacted as unsafe in previous versions.

Some examples of data that is now included, that wasn't previously:

  • the underlying errors behind barriers and assertion failures
  • some Go runtime errors (e.g. context canceled, os.PathError, etc)
  • custom error types that have a safe formatter function even though they don't report safe strings via the SafeDetails interface
  • the tree structure of secondary errors

See PR #94 for details and an example.

Bug fixes and dependency update

14 Feb 11:39
@knz knz
21aeae9
Compare
Choose a tag to compare
  • context.DeadlineExceeded is now preserved across the network, including keeping its reference so it can be compared by reference (#89).
  • a bug was fixed whereby a call cycle (and stack overflow) would happen when calling errors.Is on an error that delegates its Error method to Format or SafeFormatError (#90).
  • the errors library does not any more depend on a custom fork of sentry-go, and now uses the upstream library directly (#92). Special thanks to @jhchabran for this contribution.

Resolve go.sum checksum mismatches

02 Aug 13:38
@knz knz
71638d1
Compare
Choose a tag to compare

Version v1.8.5 had been originally tagged for commit hash that was subsequently removed, and replaced by another commit hash.
Even though the window of time between the two release events was less than 10 minutes, it was enough to get the go mod proxy confused, resulting in errors about mismatched checksums.

This release fixes it. There are otherwise no changes from v1.8.5.