sourcegraph/lib/errors
Varun Gandhi 2955bb6cfb
chore: Change errors.HasType to respect multi-errors (#63024)
With this patch, the `errors.HasType` API behaves similar to `Is` and `As`,
where it checks the full error tree instead of just checking a linearized version
of it, as cockroachdb/errors's `HasType` implementation does not respect
multi-errors.

As a consequence, a bunch of relationships between HasType and Is/As that
you'd intuitively expect to hold are now true; see changes to `invariants_test.go`.
2024-06-06 13:02:14 +00:00
..
.gitignore chore: Add tests documenting error invariants (#62992) 2024-06-03 19:46:53 +08:00
BUILD.bazel chore: Add tests documenting error invariants (#62992) 2024-06-03 19:46:53 +08:00
cockroach.go chore: Change errors.HasType to respect multi-errors (#63024) 2024-06-06 13:02:14 +00:00
CODENOTIFY chore: links/ownership devx->dev-infra (#58999) 2023-12-14 15:07:20 +00:00
errors_test.go lib/errors: document redaction, upgrade error deps (#53109) 2023-06-09 08:39:40 -07:00
errors.go lib/errors: add interfaces for typed errors (#39256) 2022-07-25 19:59:14 -04:00
filter_test.go chore: Remove unused code in errors package (#62996) 2024-05-31 09:56:42 -04:00
filter.go chore: Remove unused code in errors package (#62996) 2024-05-31 09:56:42 -04:00
invariants_test.go chore: Change errors.HasType to respect multi-errors (#63024) 2024-06-06 13:02:14 +00:00
multi_error.go chore: Replace errors.As with generic As and AsInterface (#63047) 2024-06-04 01:56:55 +00:00
postgres.go migrator: exit 0 if autoupgrade set on up (#53175) 2023-06-13 20:51:09 +00:00
warning_test.go lib/errors: Assert warning against nil error in tests (#40631) 2022-08-22 21:31:43 +05:30
warning.go all: run gofmt -s -w from 1.19 (#41629) 2022-09-13 07:44:06 +00:00