{"id":3506365,"name":"github.com/pingcap/errcode","ecosystem":"go","description":"Package errcode facilitates standardized API error codes.\nThe goal is that clients can reliably understand errors by checking against immutable error codes\n\nThis godoc documents usage. For broader context, see https://github.com/pingcap/errcode/tree/master/README.md\n\nError codes are represented as strings by CodeStr (see CodeStr documentation).\n\nThis package is designed to have few opinions and be a starting point for how you want to do errors in your project.\nThe main requirement is to satisfy the ErrorCode interface by attaching a Code to an Error.\nSee the documentation of ErrorCode.\nAdditional optional interfaces HasClientData, HasOperation, Causer, and StackTracer are provided for extensibility\nin creating structured error data representations.\n\nHierarchies are supported: a Code can point to a parent.\nThis is used in the HTTPCode implementation to inherit HTTP codes found with MetaDataFromAncestors.\nThe hierarchy is present in the Code's string representation with a dot separation.\n\nA few generic top-level error codes are provided (see the variables section of the doc).\nYou are encouraged to create your own error codes customized to your application rather than solely using generic errors.\n\nSee NewJSONFormat for an opinion on how to send back meta data about errors with the error data to a client.\nJSONFormat includes a body of response data (the \"data field\") that is by default the data from the Error\nserialized to JSON.\n\nStack traces are automatically added by NewInternalErr and show up as the Stack field in JSONFormat.\nErrors can be grouped with Combine() and ungrouped via Errors() which show up as the Others field in JSONFormat.\n\nTo extract any ErrorCodes from an error, use CodeChain().\nThis extracts error codes without information loss (using ChainContext).","homepage":"https://github.com/pingcap/errcode","licenses":"Apache-2.0","normalized_licenses":["Apache-2.0"],"repository_url":"https://github.com/pingcap/errcode","keywords_array":[],"namespace":"github.com/pingcap","versions_count":1,"first_release_published_at":"2019-03-13T04:49:43.000Z","latest_release_published_at":"2019-03-13T04:49:43.000Z","latest_release_number":"v0.3.0","last_synced_at":"2026-06-10T15:02:36.211Z","created_at":"2022-04-10T20:40:53.663Z","updated_at":"2026-06-10T15:02:36.212Z","registry_url":"https://pkg.go.dev/github.com/pingcap/errcode","install_command":"go get github.com/pingcap/errcode","documentation_url":"https://pkg.go.dev/github.com/pingcap/errcode#section-documentation","metadata":{},"repo_metadata":{"uuid":"149691020","full_name":"pingcap/errcode","owner":"pingcap","description":null,"archived":false,"fork":false,"pushed_at":"2021-08-24T14:21:12.000Z","size":175,"stargazers_count":14,"open_issues_count":0,"forks_count":4,"subscribers_count":123,"default_branch":"master","last_synced_at":"2023-03-17T12:07:45.574Z","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":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"logo_url":null,"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}},"created_at":"2018-09-21T01:13:57.000Z","updated_at":"2022-10-23T22:03:17.000Z","dependencies_parsed_at":"2022-08-27T23:21:57.794Z","dependency_job_id":null,"html_url":"https://github.com/pingcap/errcode","commit_stats":null,"repository_url":"http://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pingcap%2Ferrcode","tags_url":"http://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pingcap%2Ferrcode/tags","manifests_url":"http://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pingcap%2Ferrcode/manifests","owner_url":"http://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pingcap","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":108921946,"host_url":"http://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"http://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"http://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names"},"owner_record":{"login":"pingcap","name":"PingCAP","uuid":"11855343","kind":"organization","description":"The team behind TiDB TiKV, an open source MySQL compatible HTAP database","email":null,"website":"https://pingcap.com","location":null,"twitter":"PingCAP","company":null,"avatar_url":"https://avatars.githubusercontent.com/u/11855343?v=4","repositories_count":108,"last_synced_at":"2023-02-18T00:40:29.267Z","metadata":{"has_sponsors_listing":false},"owner_url":"http://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pingcap"},"tags":[{"name":"v0.3.0","sha":"c27220033523674cfc41381d117c9f06919ca8b9","kind":"commit","published_at":"2019-03-13T04:49:43.000Z","download_url":"https://codeload.github.com/pingcap/errcode/tar.gz/v0.3.0","html_url":"https://github.com/pingcap/errcode/releases/tag/v0.3.0"},{"name":"v0.3","sha":"c27220033523674cfc41381d117c9f06919ca8b9","kind":"commit","published_at":"2019-03-13T04:49:43.000Z","download_url":"https://codeload.github.com/pingcap/errcode/tar.gz/v0.3","html_url":"https://github.com/pingcap/errcode/releases/tag/v0.3"},{"name":"v0.2","sha":"a028bd36e74a09205eb9b99bc5ef1edea30c4a5e","kind":"tag","published_at":"2018-10-04T23:59:54.000Z","download_url":"https://codeload.github.com/pingcap/errcode/tar.gz/v0.2","html_url":"https://github.com/pingcap/errcode/releases/tag/v0.2"},{"name":"v0.1","sha":"a1a7271709d9bea2d0a0d2aab8a97d7a2ce0ea51","kind":"commit","published_at":"2018-09-21T23:24:12.000Z","download_url":"https://codeload.github.com/pingcap/errcode/tar.gz/v0.1","html_url":"https://github.com/pingcap/errcode/releases/tag/v0.1"}]},"repo_metadata_updated_at":"2023-03-21T18:40:11.247Z","dependent_packages_count":18,"downloads":null,"downloads_period":null,"dependent_repos_count":388,"rankings":{"downloads":null,"dependent_repos_count":0.3493167595841119,"dependent_packages_count":1.1621868015826475,"stargazers_count":8.898229742320467,"forks_count":8.863379350075746,"docker_downloads_count":0.4911528477009597,"average":3.9528531002527862},"purl":"pkg:golang/github.com/pingcap/errcode","advisories":[],"docker_usage_url":"https://docker.ecosyste.ms/usage/go/github.com/pingcap/errcode","docker_dependents_count":24,"docker_downloads_count":4053522,"usage_url":"https://repos.ecosyste.ms/usage/go/github.com/pingcap/errcode","dependent_repositories_url":"https://repos.ecosyste.ms/api/v1/usage/go/github.com/pingcap/errcode/dependencies","status":null,"funding_links":[],"critical":null,"issue_metadata":{"last_synced_at":"2023-05-30T02:03:47.312Z","issues_count":0,"pull_requests_count":3,"avg_time_to_close_issue":null,"avg_time_to_close_pull_request":402246.6666666667,"issues_closed_count":0,"pull_requests_closed_count":3,"pull_request_authors_count":1,"issue_authors_count":0,"avg_comments_per_issue":null,"avg_comments_per_pull_request":0.0,"merged_pull_requests_count":3,"bot_issues_count":0,"bot_pull_requests_count":0,"past_year_issues_count":0,"past_year_pull_requests_count":0,"past_year_avg_time_to_close_issue":null,"past_year_avg_time_to_close_pull_request":null,"past_year_issues_closed_count":0,"past_year_pull_requests_closed_count":0,"past_year_pull_request_authors_count":0,"past_year_issue_authors_count":0,"past_year_avg_comments_per_issue":null,"past_year_avg_comments_per_pull_request":null,"past_year_bot_issues_count":0,"past_year_bot_pull_requests_count":0,"past_year_merged_pull_requests_count":0},"versions_url":"https://packages.ecosyste.ms/api/v1/registries/proxy.golang.org/packages/github.com%2Fpingcap%2Ferrcode/versions","version_numbers_url":"https://packages.ecosyste.ms/api/v1/registries/proxy.golang.org/packages/github.com%2Fpingcap%2Ferrcode/version_numbers","latest_version_url":"https://packages.ecosyste.ms/api/v1/registries/proxy.golang.org/packages/github.com%2Fpingcap%2Ferrcode/latest_version","dependent_packages_url":"https://packages.ecosyste.ms/api/v1/registries/proxy.golang.org/packages/github.com%2Fpingcap%2Ferrcode/dependent_packages","related_packages_url":"https://packages.ecosyste.ms/api/v1/registries/proxy.golang.org/packages/github.com%2Fpingcap%2Ferrcode/related_packages","codemeta_url":"https://packages.ecosyste.ms/api/v1/registries/proxy.golang.org/packages/github.com%2Fpingcap%2Ferrcode/codemeta","maintainers":[]}