{"id":18303123,"url":"https://github.com/monzo/terrors","last_synced_at":"2025-04-06T13:08:42.197Z","repository":{"id":42973621,"uuid":"47333816","full_name":"monzo/terrors","owner":"monzo","description":null,"archived":false,"fork":false,"pushed_at":"2025-03-18T11:59:13.000Z","size":546,"stargazers_count":77,"open_issues_count":5,"forks_count":15,"subscribers_count":91,"default_branch":"master","last_synced_at":"2025-03-30T12:06:33.227Z","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":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/monzo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2015-12-03T13:30:12.000Z","updated_at":"2025-03-18T11:59:17.000Z","dependencies_parsed_at":"2024-05-02T16:39:59.960Z","dependency_job_id":"8e2930c1-f299-478d-8663-8cf60477a196","html_url":"https://github.com/monzo/terrors","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/monzo%2Fterrors","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/monzo%2Fterrors/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/monzo%2Fterrors/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/monzo%2Fterrors/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/monzo","download_url":"https://codeload.github.com/monzo/terrors/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247485283,"owners_count":20946398,"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-11-05T15:24:17.261Z","updated_at":"2025-04-06T13:08:42.171Z","avatar_url":"https://github.com/monzo.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"`terrors`\n=========\n\n[![Build Status](https://travis-ci.org/monzo/terrors.svg)](https://travis-ci.org/monzo/terrors)\n[![GoDoc](https://godoc.org/github.com/monzo/terrors?status.svg)](https://godoc.org/github.com/monzo/terrors)\n\nTerrors is a package for wrapping Golang errors. Terrors provides additional\ncontext to an error, such as an error code and a stack trace.\n\nTerrors is built and used at [Monzo](https://monzo.com/).\n\n## Usage\n\nTerrors can be used to wrap any object that satisfies the error interface:\n\n```go\nterr := terrors.Wrap(err, map[string]string{\"context\": \"my_context\"})\n```\nTerrors can be instantiated directly:\n\n```go\nerr := terrors.New(\"not_found\", \"object not found\", map[string]string{\n\t\"context\": \"my_context\"\n})\n```\n\nTerrors offers built-in functions for instantiating `Error`s with common codes:\n\n```go\nerr := terrors.NotFound(\"config_file\", \"config file not found\", map[string]string{\n\t\"context\": my_context\n})\n```\n\nTerrors provides functions for matching specific `Error`s:\n\n```go\nerr := NotFound(\"handler_missing\", \"Handler not found\", nil)\nfmt.Println(Matches(err, \"not_found.handler_missing\")) // true\n```\n\n### Retryability\n\nTerrors contains the ability to declare whether or not an error is retryable. This property\nis derived from the error code if not specified explicitly.\n\nWhen using the the wrapping functionality (e.g. `Wrap`, `Augment`, `Propagate`), the retryability\nof an error is preserved as expected. Importantly, it is also preserved when constructing a new error from\na causal error with `NewInternalWithCause`.\n\n## API\n\nFull API documentation can be found on\n[godoc](https://godoc.org/github.com/monzo/terrors)\n\n## Install\n\n```\n$ go get -u github.com/monzo/terrors\n```\n\n## License\n\nTerrors is licenced under the MIT License\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmonzo%2Fterrors","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmonzo%2Fterrors","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmonzo%2Fterrors/lists"}