{"id":23636932,"url":"https://github.com/serviejs/servie-errorhandler","last_synced_at":"2025-06-15T21:32:50.479Z","repository":{"id":46946420,"uuid":"85007882","full_name":"serviejs/servie-errorhandler","owner":"serviejs","description":"Map errors to a Servie response","archived":false,"fork":false,"pushed_at":"2021-10-10T02:58:30.000Z","size":1002,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-05-19T05:37:21.971Z","etag":null,"topics":["error-handling","errors","http","response","servie","status"],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/serviejs.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":"2017-03-14T23:36:44.000Z","updated_at":"2021-10-10T02:58:31.000Z","dependencies_parsed_at":"2022-09-14T11:01:14.327Z","dependency_job_id":null,"html_url":"https://github.com/serviejs/servie-errorhandler","commit_stats":null,"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"purl":"pkg:github/serviejs/servie-errorhandler","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/serviejs%2Fservie-errorhandler","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/serviejs%2Fservie-errorhandler/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/serviejs%2Fservie-errorhandler/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/serviejs%2Fservie-errorhandler/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/serviejs","download_url":"https://codeload.github.com/serviejs/servie-errorhandler/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/serviejs%2Fservie-errorhandler/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260053192,"owners_count":22951832,"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-handling","errors","http","response","servie","status"],"created_at":"2024-12-28T06:15:28.466Z","updated_at":"2025-06-15T21:32:50.460Z","avatar_url":"https://github.com/serviejs.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Servie Errorhandler\n\n[![NPM version](https://img.shields.io/npm/v/servie-errorhandler.svg?style=flat)](https://npmjs.org/package/servie-errorhandler)\n[![NPM downloads](https://img.shields.io/npm/dm/servie-errorhandler.svg?style=flat)](https://npmjs.org/package/servie-errorhandler)\n[![Build status](https://img.shields.io/travis/serviejs/servie-errorhandler.svg?style=flat)](https://travis-ci.org/serviejs/servie-errorhandler)\n[![Test coverage](https://img.shields.io/coveralls/serviejs/servie-errorhandler.svg?style=flat)](https://coveralls.io/r/serviejs/servie-errorhandler?branch=master)\n\n\u003e Map errors to a Servie response. Compatible with [`boom`](https://github.com/hapijs/boom) and [`http-errors`](https://github.com/jshttp/http-errors).\n\n## Installation\n\n```\nnpm install servie-errorhandler --save\n```\n\n## Usage\n\n```ts\nimport { Request } from \"servie\";\nimport { finalhandler } from \"servie-finalhandler\";\nimport { errorhandler } from \"servie-errorhandler\";\n\nconst app = compose([get(), post()]);\nconst req = new Request(\"/\");\n\napp(req, finalhandler(req)).catch(errorhandler(req));\n```\n\n## TypeScript\n\nThis project is written using [TypeScript](https://github.com/Microsoft/TypeScript) and publishes the definitions directly to NPM.\n\n## License\n\nApache 2.0\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fserviejs%2Fservie-errorhandler","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fserviejs%2Fservie-errorhandler","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fserviejs%2Fservie-errorhandler/lists"}