{"id":24196783,"url":"https://github.com/pchchv/json_errors","last_synced_at":"2025-10-12T13:07:06.675Z","repository":{"id":171245720,"uuid":"647626992","full_name":"pchchv/json_errors","owner":"pchchv","description":"JSON errors for Go Rest APIs","archived":false,"fork":false,"pushed_at":"2023-06-07T07:55:52.000Z","size":18,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-12T13:07:00.630Z","etag":null,"topics":["api","error","error-handling","error-messages","errors","go","go-library","go-module","go-package","golang","golang-library","golang-module","golang-package","json","json-error","rest","rest-api","rest-errors"],"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/pchchv.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":"2023-05-31T07:26:05.000Z","updated_at":"2023-06-07T07:58:08.000Z","dependencies_parsed_at":"2023-07-25T20:19:15.830Z","dependency_job_id":null,"html_url":"https://github.com/pchchv/json_errors","commit_stats":null,"previous_names":["pchchv/json_errors"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/pchchv/json_errors","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pchchv%2Fjson_errors","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pchchv%2Fjson_errors/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pchchv%2Fjson_errors/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pchchv%2Fjson_errors/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pchchv","download_url":"https://codeload.github.com/pchchv/json_errors/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pchchv%2Fjson_errors/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279011469,"owners_count":26084947,"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","status":"online","status_checked_at":"2025-10-12T02:00:06.719Z","response_time":53,"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":["api","error","error-handling","error-messages","errors","go","go-library","go-module","go-package","golang","golang-library","golang-module","golang-package","json","json-error","rest","rest-api","rest-errors"],"created_at":"2025-01-13T19:38:05.599Z","updated_at":"2025-10-12T13:07:06.647Z","avatar_url":"https://github.com/pchchv.png","language":"Go","readme":"# `json_errors` provides a simple error handling for your REST applications.  [![PkgGoDev](https://pkg.go.dev/badge/github.com/pchchv/json_errors)](https://pkg.go.dev/github.com/pchchv/json_errors) [![Go Report Card](https://goreportcard.com/badge/github.com/pchchv/json_errors)](https://goreportcard.com/report/github.com/pchchv/json_errors)\n\n## Features:\n\n* Compatible with built-in `error` interface\n* Error wrapping\n* JSON escaping\n\n#\n\n## Installation:\n\n```bash\ngo get github.com/pchchv/json_errors\n```\n\n#\n\n## Usage:\n\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\n\t\"github.com/pchchv/json_errors\"\n)\n\nfunc someFunc() error {\n\treturn json_errors.New(\"nope\")\n}\n\nfunc main() {\n\tif err := someFunc(); err != nil {\n\t\twrapped := json_errors.Wrap(err, \"Message about error\")\n\t\tfmt.Println(wrapped.Error())\n\t}\n}\n```\n\n```bash\ngo run main.go\n```\n\n### Output:\n\n```json\n{\"message\":\"Message about error\",\"details\":{\"message\":\"nope\"}}\n```\n\n### See [examples](examples) for more.\n\n#","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpchchv%2Fjson_errors","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpchchv%2Fjson_errors","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpchchv%2Fjson_errors/lists"}