{"id":16895894,"url":"https://github.com/stevenacoffman/anotherr","last_synced_at":"2025-10-12T15:09:40.349Z","repository":{"id":147329771,"uuid":"464217736","full_name":"StevenACoffman/anotherr","owner":"StevenACoffman","description":"Beautiful, lightweight errors with stacktraces","archived":false,"fork":false,"pushed_at":"2022-03-23T01:41:28.000Z","size":44,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-18T05:40:03.727Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/StevenACoffman.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-02-27T18:20:48.000Z","updated_at":"2022-02-27T18:21:02.000Z","dependencies_parsed_at":"2023-07-26T23:31:52.243Z","dependency_job_id":null,"html_url":"https://github.com/StevenACoffman/anotherr","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StevenACoffman%2Fanotherr","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StevenACoffman%2Fanotherr/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StevenACoffman%2Fanotherr/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StevenACoffman%2Fanotherr/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/StevenACoffman","download_url":"https://codeload.github.com/StevenACoffman/anotherr/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244592083,"owners_count":20477841,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-13T17:26:50.084Z","updated_at":"2025-10-12T15:09:35.291Z","avatar_url":"https://github.com/StevenACoffman.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"### anotherr - Another Go error package \nThe package `github.com/StevenACoffman/anotherr/errors`aims to be used as a drop-in replacement to `github.com/pkg/errors` and Go's standard errors package,\ndue to it being a crudely hacked up version of [cockroachdb/errors](https://github.com/cockroachdb/errors). (see why below)\n\nCompatibility with Khan Academy webapp errors is also provided, but instead of `github.com/Khan/webapp/pkg/lib/errors.Wrap`, use `errors.KhanWrap` for when `func Wrap(err error, msg string) error`\ndoesn't match the Khan style `func KhanWrap(err error, args ...interface{})` usage. All other functions, like `NotFound(args ...interface{})` should be drop-in replacements. \n\nAdditionally, it provides **_some_** of the benefits of [cockroachdb/errors](https://github.com/cockroachdb/errors):\n\n- it provides `Wrap` primitives akin to those found in\n  `github.com/pkg/errors`.\n- it is compatible with both the `causer` interface (`Cause() error`) from\n  `github.com/pkg/errors` and the `Wrapper` interface (`Unwrap() error`) from Go 2.\n- it enables fast, reliable and secure determination of whether\n  a particular cause is present (not relying on the presence of a substring in the error message).\n- [Stack traces for troubleshooting](https://github.com/cockroachdb/cockroach/blob/master/docs/RFCS/20190318_error_handling.md#Stack-traces-for-troubleshooting)\n- it is composable, which makes it extensible with additional error annotations;\n  for example, the basic functionality has HTTP error codes.\n\nIt does *NOT* provide:\n+ comprehensive support for PII-free reportable strings\n+ `errors.SafeFormatError()`, `SafeFormatter`\n+ wrappers to attach logtags details from context.Context\n+ transparent protobuf encode/decode with forward compatibility\n+ wrappers to denote assertion failures\n+ wrapper-aware `IsPermission()`, `IsTimeout()`, `IsExist()`, `IsNotExist()`\n\n### Why Not [cockroachdb/errors](https://github.com/cockroachdb/errors)?\n\nSo [cockroachdb/errors](https://github.com/cockroachdb/errors) is wonderful in all ways, but HEAVY.\n\nLast I checked, [cockroachdb/errors](https://github.com/cockroachdb/errors) does not work from the Go playground, although I'm not sure why.\n\nSo I very crudely hacked up a version that works in the Go playground. Mainly, this is so we can make working demos for talks.\n\nThe `_example/main.go` is to provide an example of the output.\n```\n$ go run main.go\nerror: something went wrong\n(1)\n  -- stack trace:\n  | main.bar\n  | \t/Users/steve/Documents/git/anotherr/cmd/main.go:27\n  | main.main\n  | \t/Users/steve/Documents/git/anotherr/cmd/main.go:37\n  | runtime.main\n  | \t/Users/steve/.asdf/installs/golang/1.16.12/go/src/runtime/proc.go:225\n  | runtime.goexit\n  | \t/Users/steve/.asdf/installs/golang/1.16.12/go/src/runtime/asm_amd64.s:1371\nWraps: (2) error\nWraps: (3) something went wrong\nError types: (1) *withstack.withStack (2) *errutil.withPrefix (3) main.ErrMyError\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstevenacoffman%2Fanotherr","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstevenacoffman%2Fanotherr","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstevenacoffman%2Fanotherr/lists"}