{"id":19860871,"url":"https://github.com/semantic-release/error","last_synced_at":"2025-05-02T04:30:27.280Z","repository":{"id":34947670,"uuid":"39022439","full_name":"semantic-release/error","owner":"semantic-release","description":":boom: :speech_balloon: errors but with error code","archived":false,"fork":false,"pushed_at":"2025-04-28T03:55:30.000Z","size":1235,"stargazers_count":10,"open_issues_count":4,"forks_count":6,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-28T04:31:17.563Z","etag":null,"topics":["error","semantic-release"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/semantic-release.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,"zenodo":null}},"created_at":"2015-07-13T16:02:23.000Z","updated_at":"2025-04-28T03:55:33.000Z","dependencies_parsed_at":"2023-12-25T01:40:03.956Z","dependency_job_id":"d2bf5a21-0f19-4dd9-97c8-9426ebef1c2b","html_url":"https://github.com/semantic-release/error","commit_stats":{"total_commits":265,"total_committers":10,"mean_commits":26.5,"dds":0.369811320754717,"last_synced_commit":"86fc722898a66f476a88aa50dd460b2cbbaf97f6"},"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/semantic-release%2Ferror","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/semantic-release%2Ferror/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/semantic-release%2Ferror/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/semantic-release%2Ferror/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/semantic-release","download_url":"https://codeload.github.com/semantic-release/error/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251255476,"owners_count":21560025,"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":["error","semantic-release"],"created_at":"2024-11-12T15:07:25.661Z","updated_at":"2025-05-02T04:30:27.259Z","avatar_url":"https://github.com/semantic-release.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# @semantic-release/error\n\nError type used by all [semantic-release](https://github.com/semantic-release/semantic-release) packages.\n\n[![Build Status](https://github.com/semantic-release/error/workflows/Test/badge.svg)](https://github.com/semantic-release/error/actions?query=workflow%3ATest+branch%3Amaster)\n\nErrors of type `SemanticReleaseError` or an inherited type will be considered by [semantic-release](https://github.com/semantic-release/semantic-release) as an expected exception case (no release to be done, running on a PR etc..). That indicate to the `semantic-release` process to stop and exit with the `0` success code.\n\nAny other type of error will be considered by [semantic-release](https://github.com/semantic-release/semantic-release) as an unexpected error (i/o issue, code problem etc...). That indicate to the `semantic-release` process to stop, log the error and exit with the `1` failure code.\n\n## Usage\n\n```js\nimport SemanticReleaseError from \"@semantic-release/error\";\n\n// Default\nthrow new SemanticReleaseError();\n\n// With error message\nthrow new SemanticReleaseError(\"An error happened\");\n\n// With error message and error code\nthrow new SemanticReleaseError(\"An error happened\", \"ECODE\");\n\n// With error message, error code and details\nthrow new SemanticReleaseError(\"An error happened\", \"ECODE\", \"Here is some suggestions to solve this error.\");\n\n// With inheritance\nclass InheritedError extends SemanticReleaseError {\n  constructor(message, code, newProperty, details) {\n    super(message);\n    Error.captureStackTrace(this, this.constructor);\n    this.name = this.constructor.name;\n    this.code = code;\n    this.details = details;\n    this.newProperty = \"newProperty\";\n  }\n}\n\nthrow new InheritedError(\"An error happened\", \"ECODE\", \"Here is some suggestions to solve this error.\");\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsemantic-release%2Ferror","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsemantic-release%2Ferror","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsemantic-release%2Ferror/lists"}