{"id":13432846,"url":"https://github.com/expressjs/api-error-handler","last_synced_at":"2025-09-30T03:31:26.266Z","repository":{"id":57116435,"uuid":"27839817","full_name":"expressjs/api-error-handler","owner":"expressjs","description":"Express error handlers for JSON APIs","archived":true,"fork":false,"pushed_at":"2025-05-14T13:22:38.000Z","size":5,"stargazers_count":101,"open_issues_count":0,"forks_count":22,"subscribers_count":10,"default_branch":"master","last_synced_at":"2025-09-01T02:30:42.880Z","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/expressjs.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":"2014-12-10T21:08:37.000Z","updated_at":"2025-05-14T13:23:40.000Z","dependencies_parsed_at":"2022-08-22T16:40:32.652Z","dependency_job_id":null,"html_url":"https://github.com/expressjs/api-error-handler","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/expressjs/api-error-handler","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/expressjs%2Fapi-error-handler","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/expressjs%2Fapi-error-handler/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/expressjs%2Fapi-error-handler/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/expressjs%2Fapi-error-handler/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/expressjs","download_url":"https://codeload.github.com/expressjs/api-error-handler/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/expressjs%2Fapi-error-handler/sbom","scorecard":{"id":388434,"data":{"date":"2025-08-11","repo":{"name":"github.com/expressjs/api-error-handler","commit":"187443063cdcc7453b1ca95589cc18881ce23847"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.9,"checks":[{"name":"Maintained","score":0,"reason":"project is archived","details":["Warn: Repository is archived."],"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Code-Review","score":0,"reason":"Found 0/4 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Security-Policy","score":10,"reason":"security policy file detected","details":["Info: security policy file detected: github.com/expressjs/.github/SECURITY.md:1","Info: Found linked content: github.com/expressjs/.github/SECURITY.md:1","Info: Found disclosure, vulnerability, and/or timelines in security policy: github.com/expressjs/.github/SECURITY.md:1","Info: Found text in security policy: github.com/expressjs/.github/SECURITY.md:1"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}}]},"last_synced_at":"2025-08-18T17:14:10.325Z","repository_id":57116435,"created_at":"2025-08-18T17:14:10.325Z","updated_at":"2025-08-18T17:14:10.325Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":277626819,"owners_count":25849786,"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","status":"online","status_checked_at":"2025-09-30T02:00:09.208Z","response_time":75,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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-07-31T02:01:17.466Z","updated_at":"2025-09-30T03:31:26.260Z","avatar_url":"https://github.com/expressjs.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"\u003e [!CAUTION]\n\u003e **This repository is archived and no longer actively maintained.**\n\u003e\n\u003e We are no longer accepting issues, feature requests, or pull requests.\n\u003e For additional support or questions, please visit the [Express.js Discussions page](https://github.com/expressjs/express/discussions).\n\n\n# api-error-handler\n\n[![NPM version][npm-image]][npm-url]\n[![Build status][travis-image]][travis-url]\n[![Test coverage][coveralls-image]][coveralls-url]\n[![Dependency Status][david-image]][david-url]\n[![License][license-image]][license-url]\n[![Downloads][downloads-image]][downloads-url]\n[![Gittip][gittip-image]][gittip-url]\n\nAn error handler for JSON APIs, meant to be used with [http-errors](https://github.com/jshttp/http-errors)-style errors.\n\n## Example\n\n```js\nvar errorHandler = require('api-error-handler');\n\nvar api = new express.Router();\napi.get('/users/:userid', function (req, res, next) {\n\n});\n\napi.use(errorHandler());\n\napp.use('/api', api);\n```\n\n## API\n\n### .use(errorHandler([options]))\n\nCurrently no options.\n\n### Errors\n\n4xx errors are exposed to the client.\nProperties exposed are:\n\n- `message`\n- `type`\n- `name`\n- `code`\n- `status`\n\n5xx errors are not exposed to the client.\nInstead, they are given a generic `message` as well as the `type`.\n\n[gitter-image]: https://badges.gitter.im/expressjs/api-error-handler.png\n[gitter-url]: https://gitter.im/expressjs/api-error-handler\n[npm-image]: https://img.shields.io/npm/v/api-error-handler.svg?style=flat-square\n[npm-url]: https://npmjs.org/package/api-error-handler\n[github-tag]: http://img.shields.io/github/tag/expressjs/api-error-handler.svg?style=flat-square\n[github-url]: https://github.com/expressjs/api-error-handler/tags\n[travis-image]: https://img.shields.io/travis/expressjs/api-error-handler.svg?style=flat-square\n[travis-url]: https://travis-ci.org/expressjs/api-error-handler\n[coveralls-image]: https://img.shields.io/coveralls/expressjs/api-error-handler.svg?style=flat-square\n[coveralls-url]: https://coveralls.io/r/expressjs/api-error-handler\n[david-image]: http://img.shields.io/david/expressjs/api-error-handler.svg?style=flat-square\n[david-url]: https://david-dm.org/expressjs/api-error-handler\n[license-image]: http://img.shields.io/npm/l/api-error-handler.svg?style=flat-square\n[license-url]: LICENSE\n[downloads-image]: http://img.shields.io/npm/dm/api-error-handler.svg?style=flat-square\n[downloads-url]: https://npmjs.org/package/api-error-handler\n[gittip-image]: https://img.shields.io/gratipay/jonathanong.svg?style=flat-square\n[gittip-url]: https://gratipay.com/expressjs/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fexpressjs%2Fapi-error-handler","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fexpressjs%2Fapi-error-handler","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fexpressjs%2Fapi-error-handler/lists"}