{"id":21380424,"url":"https://github.com/adinvadim/tiny-code-error","last_synced_at":"2025-06-20T04:06:06.259Z","repository":{"id":239146416,"uuid":"798681382","full_name":"adinvadim/tiny-code-error","owner":"adinvadim","description":"🩵 Simple CodeError JS class (zero deps)","archived":false,"fork":false,"pushed_at":"2024-05-11T11:33:49.000Z","size":39,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-16T14:16:13.255Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","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/adinvadim.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2024-05-10T09:12:31.000Z","updated_at":"2024-05-11T11:33:52.000Z","dependencies_parsed_at":"2024-05-10T10:28:51.808Z","dependency_job_id":"585920ec-3d59-4897-9dc2-064a9f4f2950","html_url":"https://github.com/adinvadim/tiny-code-error","commit_stats":null,"previous_names":["adinvadim/code-error"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/adinvadim/tiny-code-error","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adinvadim%2Ftiny-code-error","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adinvadim%2Ftiny-code-error/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adinvadim%2Ftiny-code-error/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adinvadim%2Ftiny-code-error/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/adinvadim","download_url":"https://codeload.github.com/adinvadim/tiny-code-error/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adinvadim%2Ftiny-code-error/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260878327,"owners_count":23075959,"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","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":[],"created_at":"2024-11-22T10:40:20.904Z","updated_at":"2025-06-20T04:06:01.241Z","avatar_url":"https://github.com/adinvadim.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# tiny-code-error\n\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](#License)\n\nIt is very-very-very simple Error class, which have code and payload.\nI create this package, because I used this class in many-many projects, because\nCode Error it is more informative and type control then simple Error with just\nmessage.\n\n## 📦 Install\n\n```sh\nyarn add tiny-code-error\n```\n\n```sh\npnpm i tiny-code-error\n```\n\n## 🌟 Example\n\n```typescript\nexport enum PaymentErrorCode {\n  USER_NOT_REGISTER = \"app/payment/user-not-register\",\n  PAYMENT_NOT_VERIFY = \"app/payment/not-verify\",\n  NOT_NEW = \"app/payment/not-new\",\n  CANT_UPDATE = \"app/payment/cant-update\",\n  ALREADY_PAID = \"app/payment/already-paid\",\n  VALIDATION_ERROR = \"app/payment/validation-error\",\n  SUBSCRIPTION_PAYMENT_INCCORECT = \"app/payment/subscription-payment-incorrect\",\n}\n\nexport class PaymentError extends CodeError\u003cPaymentErrorCode\u003e {}\n\nexport const enum ResetPasswordErrorCode {\n  USER_NOT_FOUND = \"app/reset/user-not-found\",\n  UNKNOWN = \"app/reset/unknown\",\n}\n\nexport class ResetPasswordError extends CodeError\u003cResetPasswordErrorCode\u003e {}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadinvadim%2Ftiny-code-error","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fadinvadim%2Ftiny-code-error","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadinvadim%2Ftiny-code-error/lists"}