{"id":46772116,"url":"https://github.com/hanagantig/aerrors","last_synced_at":"2026-03-09T23:39:39.953Z","repository":{"id":45267592,"uuid":"371801605","full_name":"hanagantig/aerrors","owner":"hanagantig","description":"async errors handling in GO","archived":false,"fork":false,"pushed_at":"2021-12-31T17:51:06.000Z","size":33,"stargazers_count":12,"open_issues_count":2,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-06-19T06:46:16.541Z","etag":null,"topics":["async","error-handling","go","go-errors","golang"],"latest_commit_sha":null,"homepage":"","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/hanagantig.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-05-28T19:34:43.000Z","updated_at":"2024-06-19T06:46:16.542Z","dependencies_parsed_at":"2022-08-19T18:50:45.717Z","dependency_job_id":null,"html_url":"https://github.com/hanagantig/aerrors","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/hanagantig/aerrors","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hanagantig%2Faerrors","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hanagantig%2Faerrors/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hanagantig%2Faerrors/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hanagantig%2Faerrors/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hanagantig","download_url":"https://codeload.github.com/hanagantig/aerrors/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hanagantig%2Faerrors/sbom","scorecard":{"id":454105,"data":{"date":"2025-08-11","repo":{"name":"github.com/hanagantig/aerrors","commit":"ad66ffc1a2fb08de3fe09621eb7c1c35bd28a139"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3,"checks":[{"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":"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":"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":"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":"Code-Review","score":0,"reason":"Found 0/19 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":"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":"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":"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":"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":"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":"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":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: 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":"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 12 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":10,"reason":"0 existing vulnerabilities detected","details":null,"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:07:20.571Z","repository_id":45267592,"created_at":"2025-08-19T09:07:20.571Z","updated_at":"2025-08-19T09:07:20.571Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30316773,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-09T20:05:46.299Z","status":"ssl_error","status_checked_at":"2026-03-09T19:57:04.425Z","response_time":61,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["async","error-handling","go","go-errors","golang"],"created_at":"2026-03-09T23:39:39.312Z","updated_at":"2026-03-09T23:39:39.937Z","avatar_url":"https://github.com/hanagantig.png","language":"Go","readme":"[![GoDoc](http://godoc.org/github.com/hanagantig/aerrors?status.png)](http://godoc.org/github.com/hanagantig/aerrors)\n[![Build Status](https://travis-ci.org/hanagantig/aerrors.svg?branch=main)](https://travis-ci.com/hanagantig/aerrors)\n\n# aerrors\n\nPackage aerrors adds **async errors** handling support in GO\n\nThis is effective when you want to recover panics in all your goroutines, build an error from it and handle all such errors in one place (logging them or monitor).\n\nThere is additionally the `Wrap()` method, which helps you to build manually 'stacktrace' with errors chain. \n\n## Getting started\nTo download the package, run:\n```bash\ngo get github.com/hanagantig/aerrors\n```\n\nImport it in your program as:\n```go\nimport \"github.com/hanagantig/aerrors\"\n```\n\nIt requires Go 1.13 or later.\n\nRefer to the documentation here:\nhttp://godoc.org/github.com/hanagantig/aerrors\n\n### Basic usage\n```go\npackage main\n\nimport (\n    \"github.com/hanagantig/aerrors\"\n)\n\nfunc crashFunc()  {\n    panic(\"crashFunc panic\")\n}\n\nfunc main() {\n    aerror := aerrors.New()\n    aerror.StartHandle()\n    \n    server := runHTTP()\n    \n    // runs crashFunc in panic-safe goroutine and adds error to handle\n    aerror.Go(crashFunc)\n\n    server.Stop()\n    aerror.Stop()\n}\n```\n\n### With custom handler function\nYou also can implement your custom handler. \nMerely use available option aerrors.WithHandler().\n\n```go\npackage main\n\nimport (\n    \"github.com/hanagantig/aerrors\"\n)\n\ntype CustomErrorHandler struct {}\nfunc (eh *CustomErrorHandler) HandleError(err error)  {\n    // do what you want with your error here\n}\n\nfunc main() {\n    h := CustomErrorHandler{}\n    aerror := aerrors.New(aerrors.WithHandler(\u0026h))\n    _ = aerror.StartHandle()\n    \n    aerror.Close() // for graceful shutdown\n}\n```\n\n### Global usage\nAs well as create particular error struct you can initialize it globally and call\nfrom where you want.\n```go\npackage main\n\nimport (\n    \"errors\"\n    \"log\"\n    \"github.com/hanagantig/aerrors\"\n)\n\nfunc foo(id int) (err error) {\n    aerrors.Get().Go(crashFunc)\n    aerrors.Get().Add(errors.New(\"some error to handle\"))\n}\n\nfunc crashFunc()  {\n    panic(\"crashFunc panic\")\n}\n\nfunc main() {\n    err := aerrors.Init()\n    if err != nil {\n        log.Fatal(err)\n    }\n    \n    aerrors.Get().StartHandle()\n\n    server := runHTTP()\n    \n    server.Stop()\n    aerrors.Get().Stop()\n}\n```\n\n### Some more features\nIn addition, you are capable to build your own stack trace with needed functions contains all desired information.\n```go\npackage main\n\nimport (\n    \"fmt\"\n    \"errors\"\n    \"github.com/hanagantig/aerrors\"\n)\n\nfunc foo(id int) (err error){\n    defer aerrors.Wrap(\u0026err, \"foo(%v)\", id)\n\n    err = errors.New(\"errors in foo\")\n    return\n}\n\nfunc bar(id int, tag string) (err error)  {\n    defer aerrors.Wrap(\u0026err, \"bar(%v, %v)\", id, tag)\n    \n    err = foo(id)\n    return\n}\n\nfunc main() {\n    err := bar(1, \"aerrors_wrap\")\n    fmt.Printf(\"%v\", err)   \n}\n\n// output\n// bar(1, aerrors_wrap): foo(1): errors in foo\n``` ","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhanagantig%2Faerrors","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhanagantig%2Faerrors","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhanagantig%2Faerrors/lists"}