{"id":15287499,"url":"https://github.com/harwoeck/apperr","last_synced_at":"2026-02-15T03:02:22.445Z","repository":{"id":57618723,"uuid":"388072691","full_name":"harwoeck/apperr","owner":"harwoeck","description":"🗑 apperr provides a unified framework- and network-agnostic error generation interface. Errors can be localized and converted to GRPC, Twirp, HTTP, etc. equivalents","archived":false,"fork":false,"pushed_at":"2022-10-28T07:41:21.000Z","size":79,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-06T10:47:16.157Z","etag":null,"topics":["apperr","application-error","error","error-handling","errors","go","golang","grpc","i18n","localization","twirp"],"latest_commit_sha":null,"homepage":"","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/harwoeck.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}},"created_at":"2021-07-21T09:59:31.000Z","updated_at":"2023-08-20T11:44:59.000Z","dependencies_parsed_at":"2022-09-16T18:50:27.898Z","dependency_job_id":null,"html_url":"https://github.com/harwoeck/apperr","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/harwoeck/apperr","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/harwoeck%2Fapperr","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/harwoeck%2Fapperr/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/harwoeck%2Fapperr/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/harwoeck%2Fapperr/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/harwoeck","download_url":"https://codeload.github.com/harwoeck/apperr/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/harwoeck%2Fapperr/sbom","scorecard":{"id":456673,"data":{"date":"2025-08-11","repo":{"name":"github.com/harwoeck/apperr","commit":"ed1103955f3bd1e016ad70c4a53730eae3b47f64"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.8,"checks":[{"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":"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":"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":"Code-Review","score":0,"reason":"Found 0/20 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":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"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":"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":"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 'main'"],"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 18 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":8,"reason":"2 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GO-2023-2153 / GHSA-m425-mq94-257g / GHSA-qppj-fm5r-hxr3","Warn: Project is vulnerable to: GO-2024-2611 / GHSA-8r3f-844c-mc37"],"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-19T09:52:52.362Z","repository_id":57618723,"created_at":"2025-08-19T09:52:52.362Z","updated_at":"2025-08-19T09:52:52.362Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29466925,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-15T01:01:38.065Z","status":"online","status_checked_at":"2026-02-15T02:00:07.449Z","response_time":118,"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"}},"keywords":["apperr","application-error","error","error-handling","errors","go","golang","grpc","i18n","localization","twirp"],"created_at":"2024-09-30T15:29:35.567Z","updated_at":"2026-02-15T03:02:22.427Z","avatar_url":"https://github.com/harwoeck.png","language":"Go","readme":"# 🗑 apperr\n\n_apperr_ provides a unified application error generation interface. Errors can be localized and converted to GRPC, Twirp, HTTP, etc. equivalents\n\n[![Go Reference](https://pkg.go.dev/badge/github.com/harwoeck/apperr.svg)](https://pkg.go.dev/github.com/harwoeck/apperr)\n\n## Installation\n\nTo install _apperr_, simly run:\n\n```bash\n$ go get github.com/harwoeck/apperr\n```\n\n## Usage\n\n#### Create\n\nTo create errors use one of the [provided functions](https://pkg.go.dev/github.com/harwoeck/apperr#pkg-index) from apperr, like `apperr.Unauthenticated(msg)`\n\n```go\nerr := apperr.Unauthenticated(\"provided password is invalid\",\n    apperr.Localize(\"INVALID_PASSWORD\"))\n```\n\n_apperr_ can provide localized error messages to users, when a [`LocalizationProvider`](https://pkg.go.dev/github.com/harwoeck/apperr#LocalizationProvider) is available. In order to add a translation message id to your [`*AppError`](https://pkg.go.dev/github.com/harwoeck/apperr#AppError) you can use one of the provided [`Option`](https://pkg.go.dev/github.com/harwoeck/apperr#Option) (in the example [`Localize(messageID)`](https://pkg.go.dev/github.com/harwoeck/apperr#Localize) is used)\n\n#### Render\n\nIn order to render an [`*AppError`](https://pkg.go.dev/github.com/harwoeck/apperr#Render) into a [`*RenderedError`](https://pkg.go.dev/github.com/harwoeck/apperr#RenderedError) use the static function [`Render`](https://pkg.go.dev/github.com/harwoeck/apperr#Render):\n\n```go\nrendered, _ := apperr.Render(err, apperr.RenderLocalized(adapter, \"en-US\"))\n```\n\n#### Convert\n\nUse the `Convert` function from your installed converter to translate the `*RenderedError` from last step to your frameworks native error type:\n\n- [GRPC](https://pkg.go.dev/github.com/harwoeck/apperr/x/grpcerr)\n  - Install converter `go get github.com/harwoeck/apperr/x/grpcerr`\n  - ```go\n    grpcStatus, err := grpcerr.Convert(*finalized.Error)\n    ```\n- [HTTP](https://pkg.go.dev/github.com/harwoeck/apperr/x/httperr)\n  - Install converter `go get github.com/harwoeck/apperr/x/httperr`\n  - ```go\n    httpStatus, httpBody, err := httperr.Convert(*finalized.Error)\n    ```\n- [Twirp](https://pkg.go.dev/github.com/harwoeck/apperr/x/twirperr)\n  - Install converter `go get github.com/harwoeck/apperr/x/twirperr`\n  - ```go\n    twirpError := twirperr.Convert(*finalized.Error)\n    ```\n- [Terminal or Console](https://pkg.go.dev/github.com/harwoeck/apperr/x/terminalerr)\n  - Install converter `go get github.com/harwoeck/apperr/x/terminalerr`\n  - ```go\n    output := terminalerr.Convert(*finalized.Error)\n    fmt.Println(output)\n    ```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fharwoeck%2Fapperr","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fharwoeck%2Fapperr","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fharwoeck%2Fapperr/lists"}