{"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","latest_published_release_number":null,"last_synced_at":"2026-07-15T21:08:37.758Z","created_at":"2022-04-10T20:40:53.663Z","updated_at":"2026-08-31T18:03:59.776Z","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":{"id":57483571,"uuid":"149691020","full_name":"pingcap/errcode","owner":"pingcap","description":null,"archived":false,"fork":false,"pushed_at":"2023-11-02T07:39:06.000Z","size":178,"stargazers_count":16,"open_issues_count":0,"forks_count":8,"subscribers_count":106,"default_branch":"master","last_synced_at":"2026-07-22T08:17:53.205Z","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,"icon_url":"https://github.com/pingcap.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":"2018-09-21T01:13:57.000Z","updated_at":"2025-01-22T16:30:58.000Z","dependencies_parsed_at":"2024-06-18T17:06:12.166Z","dependency_job_id":null,"html_url":"https://github.com/pingcap/errcode","commit_stats":{"total_commits":25,"total_committers":3,"mean_commits":8.333333333333334,"dds":0.07999999999999996,"last_synced_commit":"4d6d0ddd9c6f2eb2cc803acf7cd0aeb8df50b33a"},"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/pingcap/errcode","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pingcap%2Ferrcode","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pingcap%2Ferrcode/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pingcap%2Ferrcode/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pingcap%2Ferrcode/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pingcap","download_url":"https://codeload.github.com/pingcap/errcode/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pingcap%2Ferrcode/sbom","scorecard":{"id":734315,"data":{"date":"2025-08-11","repo":{"name":"github.com/pingcap/errcode","commit":"8746955a5571521858e28bfc15432f57279c975c"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2,"checks":[{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Code-Review","score":0,"reason":"Found 0/24 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: goCommand not pinned by hash: scripts/retool-install.sh:8","Info:   0 out of   1 goCommand dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: Apache License 2.0: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 9 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":3,"reason":"7 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GO-2023-1988 / GHSA-2wrh-6pvc-2jm9","Warn: Project is vulnerable to: GO-2023-2102 / GHSA-4374-p667-p6c8","Warn: Project is vulnerable to: GO-2023-2153 / GHSA-m425-mq94-257g / GHSA-qppj-fm5r-hxr3","Warn: Project is vulnerable to: GO-2024-2687 / GHSA-4v7x-pqxf-cx7m","Warn: Project is vulnerable to: GO-2024-3333","Warn: Project is vulnerable to: GO-2025-3503 / GHSA-qxp5-gwg8-xv66","Warn: Project is vulnerable to: GO-2025-3595 / GHSA-vvgc-356p-c3xw"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-22T15:18:15.246Z","repository_id":57483571,"created_at":"2025-08-22T15:18:15.246Z","updated_at":"2025-08-22T15:18:15.246Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":37006132,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-08-22T15:14:58.755Z","status":"online","status_checked_at":"2026-08-31T02:00:07.497Z","response_time":119,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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"},"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,"icon_url":"https://avatars.githubusercontent.com/u/11855343?v=4","repositories_count":158,"last_synced_at":"2024-12-18T16:34:14.744Z","metadata":{"has_sponsors_listing":false},"html_url":"https://github.com/pingcap","funding_links":[],"total_stars":76081,"followers":1468,"following":0,"created_at":"2022-11-04T10:50:59.203Z","updated_at":"2024-12-18T16:34:14.744Z","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pingcap","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pingcap/repositories"},"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","dependencies_parsed_at":null,"dependency_job_id":null,"purl":"pkg:github/pingcap/errcode@v0.3.0","tag_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pingcap%2Ferrcode/tags/v0.3.0","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pingcap%2Ferrcode/tags/v0.3.0/manifests"},{"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","dependencies_parsed_at":null,"dependency_job_id":null,"purl":"pkg:github/pingcap/errcode@v0.3","tag_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pingcap%2Ferrcode/tags/v0.3","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pingcap%2Ferrcode/tags/v0.3/manifests"},{"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","dependencies_parsed_at":null,"dependency_job_id":null,"purl":"pkg:github/pingcap/errcode@v0.2","tag_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pingcap%2Ferrcode/tags/v0.2","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pingcap%2Ferrcode/tags/v0.2/manifests"},{"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","dependencies_parsed_at":null,"dependency_job_id":null,"purl":"pkg:github/pingcap/errcode@v0.1","tag_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pingcap%2Ferrcode/tags/v0.1","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pingcap%2Ferrcode/tags/v0.1/manifests"}]},"repo_metadata_updated_at":"2026-08-31T18:03:59.776Z","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":"2024-11-06T03:18:38.756Z","issues_count":0,"pull_requests_count":5,"avg_time_to_close_issue":null,"avg_time_to_close_pull_request":514339.6,"issues_closed_count":0,"pull_requests_closed_count":5,"pull_request_authors_count":3,"issue_authors_count":0,"avg_comments_per_issue":null,"avg_comments_per_pull_request":0.0,"merged_pull_requests_count":4,"bot_issues_count":0,"bot_pull_requests_count":1,"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,"issues_url":"https://issues.ecosyste.ms/api/v1/hosts/GitHub/repositories/pingcap%2Ferrcode/issues","maintainers":[],"active_maintainers":[]},"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":[]}