{"id":17651041,"url":"https://github.com/tilap/error-extend","last_synced_at":"2025-03-30T08:27:22.998Z","repository":{"id":57226728,"uuid":"57034439","full_name":"tilap/error-extend","owner":"tilap","description":"Node js custom error class builder","archived":false,"fork":false,"pushed_at":"2016-04-25T11:22:38.000Z","size":7,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-05T19:07:30.108Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/tilap.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":"2016-04-25T10:54:12.000Z","updated_at":"2016-04-25T11:00:33.000Z","dependencies_parsed_at":"2022-08-22T12:30:38.439Z","dependency_job_id":null,"html_url":"https://github.com/tilap/error-extend","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tilap%2Ferror-extend","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tilap%2Ferror-extend/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tilap%2Ferror-extend/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tilap%2Ferror-extend/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tilap","download_url":"https://codeload.github.com/tilap/error-extend/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246293837,"owners_count":20754330,"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-10-23T11:40:02.616Z","updated_at":"2025-03-30T08:27:22.975Z","avatar_url":"https://github.com/tilap.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"﻿Error extend [![NPM version][npm-image]][npm-url]\n============================\n\nSimple way to extend JS Error class with custom code or default message.\n\n## Install\n\n```\nnpm install --save error-extend\n```\n\n## Usage\n\n```\nconst errorExtends = require('error-extend');\nconst MyCustomError = errorExtends({ name: 'MyCustomError', code: 418, defaultMessage: 'I am a teapot' });\n\nthrow new MyCustomError();\nthrow new MyCustomError('I am a wonderfull teapot');\n```\n\n## Options\n\n- ```name```, the name of the error class\n- ```code```, default code of the error\n- ```defaultMessage```, default message of the error is none is provided on Error instance\n- ```init```: an init function with error to custom on settings\n\n## License\n\nMIT\n\n[npm-image]: https://img.shields.io/npm/v/error-extend.svg?style=flat\n[npm-url]: https://npmjs.org/package/error-extend\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftilap%2Ferror-extend","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftilap%2Ferror-extend","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftilap%2Ferror-extend/lists"}