{"id":24493052,"url":"https://github.com/open-node/errors","last_synced_at":"2025-03-15T03:29:58.630Z","repository":{"id":57133381,"uuid":"224342037","full_name":"open-node/errors","owner":"open-node","description":"make the error object with custom defines","archived":false,"fork":false,"pushed_at":"2021-01-08T02:02:08.000Z","size":5,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-22T02:02:34.893Z","etag":null,"topics":["debugger","error","logging"],"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/open-node.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":"2019-11-27T04:10:40.000Z","updated_at":"2021-01-08T02:02:10.000Z","dependencies_parsed_at":"2022-09-03T15:02:45.672Z","dependency_job_id":null,"html_url":"https://github.com/open-node/errors","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/open-node%2Ferrors","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/open-node%2Ferrors/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/open-node%2Ferrors/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/open-node%2Ferrors/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/open-node","download_url":"https://codeload.github.com/open-node/errors/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243680970,"owners_count":20330152,"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":["debugger","error","logging"],"created_at":"2025-01-21T19:19:00.141Z","updated_at":"2025-03-15T03:29:58.607Z","avatar_url":"https://github.com/open-node.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# @open-node/errors\nmake the error object with custom defines\n\n[![Build status](https://travis-ci.com/open-node/errors.svg?branch=master)](https://travis-ci.org/open-node/errors)\n[![codecov](https://codecov.io/gh/open-node/errors/branch/master/graph/badge.svg)](https://codecov.io/gh/open-node/errors)\n\n# Installation\n\u003cpre\u003enpm i @open-node/errors --save\u003c/pre\u003e\n\n# Usage\n* your node.js process code\n\u003cpre\u003e\nconst Errors = require('@open-node/errors');\n\nconst defines = [\n  ['yourErrorCode', 'Your error message, allow add variable, eg: %s']\n  ['yourErrorCode2', 'Your error message, allow add variable, eg: %s, %d']\n];\nconst errors = Errors(defines);\n\n// usage in your code\ntry {\n  ...\n  ...\n} catch (e) {\n  const error = errors.yourErrorCode(e.message); // returns error be instanceOf Error\n  writeErrorLog(error);\n}\n\n\u003c/pre\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopen-node%2Ferrors","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fopen-node%2Ferrors","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopen-node%2Ferrors/lists"}