{"id":45579213,"url":"https://github.com/usrz/js-express-statuses","last_synced_at":"2026-02-23T11:32:00.770Z","repository":{"id":29655123,"uuid":"33196845","full_name":"usrz/js-express-statuses","owner":"usrz","description":"Simple response statuses for Express 4.x","archived":false,"fork":false,"pushed_at":"2017-05-14T21:25:13.000Z","size":9,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-08-09T05:55:51.613Z","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":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/usrz.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-03-31T16:33:18.000Z","updated_at":"2017-05-14T21:25:11.000Z","dependencies_parsed_at":"2022-08-03T15:20:15.205Z","dependency_job_id":null,"html_url":"https://github.com/usrz/js-express-statuses","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/usrz/js-express-statuses","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/usrz%2Fjs-express-statuses","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/usrz%2Fjs-express-statuses/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/usrz%2Fjs-express-statuses/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/usrz%2Fjs-express-statuses/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/usrz","download_url":"https://codeload.github.com/usrz/js-express-statuses/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/usrz%2Fjs-express-statuses/sbom","scorecard":{"id":912831,"data":{"date":"2025-08-11","repo":{"name":"github.com/usrz/js-express-statuses","commit":"a38ee6097e5bf8de5bc28767117e25505eeaf15d"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.6,"checks":[{"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":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"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":"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":"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":"Code-Review","score":0,"reason":"Found 0/9 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":"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":"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":"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":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"License","score":0,"reason":"license file not detected","details":["Warn: project does not have a license file"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"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":"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"}}]},"last_synced_at":"2025-08-24T19:53:01.567Z","repository_id":29655123,"created_at":"2025-08-24T19:53:01.567Z","updated_at":"2025-08-24T19:53:01.567Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29741588,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-23T07:44:07.782Z","status":"ssl_error","status_checked_at":"2026-02-23T07:44:07.432Z","response_time":90,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":"2026-02-23T11:31:59.360Z","updated_at":"2026-02-23T11:32:00.757Z","avatar_url":"https://github.com/usrz.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"Express Statuses\n================\n\nA very simple collection of statuses suitable to be used with the\n[express-errorlog](https://www.npmjs.com/package/express-errorlog) package.\n\n* [Install and use](#install-and-use)\n* [Statuses](#statuses)\n  * [Getting Statuses](#getting-statuses)\n  * Overriding [Messages](#messages)\n  * Wrapping [Errors](#errors)\n  * [Multiple overrides](#multiple-overrides)\n* [License (MIT)](#license-mit-)\n\n\n\nInstall and use\n---------------\n\nInstall as usual with _NPM_:\n\n```bash\nnpm install --save express-statuses\n```\n\nThen use it in your express app!\n\n```javascript\nvar S = require('express-statuses');\n...\napp.get('/foobar', function(req, res, next) {\n  next(S.BAD_REQUEST);\n})\n```\n\nThe application error handler will see an object containing the following:\n\n```javascript\napp.use(function(err, req, res, next) {\n  // err will be { status: 400, message: 'Bad Request' }\n  ...\n})\n```\n\nA handy collection of status codes can also be accessed via the `C` sub-object:\n\n```javascript\napp.post('/collection', function(req, res, next) {\n  ...\n  res.sendStatus(S.C.CREATED);\n})\n```\n\n#### Getting statuses\n\nStatuses can be referenced by name:\n\n```javascript\nS.NOT_FOUND;\n```\n\nOr can be accessed by status code:\n\n```javascript\nS(404);\n```\n\nAll returned statuses can be passed to `next(...)` as-is or (being functions)\ncan be used to further customize what is passed to the error handler.\n\nCustomization and inclusion can be done in few ways:\n\n#### Messages\n\nMessages can be overridden by simply invoking a status as a function:\n\n```javascript\nnext(S.NOT_FOUND('Something is amiss'));\n```\n\nwill result in the error handler receiving the following as its first parameter:\n\n```json\n{\n  \"status\": 404,\n  \"message\": \"Something is amiss\"\n}\n```\n\n#### Errors\n\nErrors can be nested for further logging by the error handler:\n\n```javascript\ntry {\n  ...\n} catch (error) {\n  next(S.BAD_REQUEST(error));\n}\n```\n\nwill result in the error handler receiving the following as its first parameter:\n\n```javascript\n{\n  \"status\": 400,\n  \"message\": \"Bad Request\"\n  \"error\": ... // reference to the error for logging\n}\n```\n\n#### Multiple overrides\n\nFor better [express-errorlog](https://www.npmjs.com/package/express-errorlog)\nintegration, a number of parameters can be specified as options:\n\n```javascript\nnext(S.UNAUTHORIZED({\n  message: 'No way I am letting you in',\n  details: { key: 'Some extra stuff here' }\n  error: myCaughtException\n}));\n```\n\nwill result in the error handler receiving the following as its first parameter:\n\n```javascript\n{\n  \"status\": 400,\n  \"message\": \"No way I am letting you in\",\n  \"details\": { \"key\": \"Some extra stuff here\" }\n  \"error\": // reference to myCaughtException\n}\n```\n\n\nStatuses\n---------\n\nListed here are all currently configured statuses:\n\n* Informational\n  * `CONTINUE`: 100\n  * `SWITCHING_PROTOCOLS`: 101\n  * `PROCESSING`: 102\n* Successful\n  * `OK`: 200\n  * `CREATED`: 201\n  * `ACCEPTED`: 202\n  * `NON_AUTHORITATIVE_INFORMATION`: 203\n  * `NO_CONTENT`: 204\n  * `RESET_CONTENT`: 205\n  * `PARTIAL_CONTENT`: 206\n  * `MULTI_STATUS`: 207\n  * `ALREADY_REPORTED`: 208\n  * `IM_USED`: 226\n* Redirection\n  * `MULTIPLE_CHOICES`: 300\n  * `MOVED_PERMANENTLY`: 301\n  * `FOUND`: 302\n  * `SEE_OTHER`: 303\n  * `NOT_MODIFIED`: 304\n  * `USE_PROXY`: 305\n  * `_UNUSED_`: 306\n  * `TEMPORARY_REDIRECT`: 307\n  * `PERMANENT_REDIRECT`: 308\n* Client Errors\n  * `BAD_REQUEST`: 400\n  * `UNAUTHORIZED`: 401\n  * `PAYMENT_REQUIRED`: 402\n  * `FORBIDDEN`: 403\n  * `NOT_FOUND`: 404\n  * `METHOD_NOT_ALLOWED`: 405\n  * `NOT_ACCEPTABLE`: 406\n  * `PROXY_AUTHENTICATION_REQUIRED`: 407\n  * `REQUEST_TIMEOUT`: 408\n  * `CONFLICT`: 409\n  * `GONE`: 410\n  * `LENGTH_REQUIRED`: 411\n  * `PRECONDITION_FAILED`: 412\n  * `PAYLOAD_TOO_LARGE`: 413\n  * `URI_TOO_LONG`: 414\n  * `UNSUPPORTED_MEDIA_TYPE`: 415\n  * `RANGE_NOT_SATISFIABLE`: 416\n  * `EXPECTATION_FAILED`: 417\n  * `I_AM_A_TEAPOT`: 418\n  * `UNPROCESSABLE_ENTITY`: 422\n  * `LOCKED`: 423\n  * `FAILED_DEPENDENCY`: 424\n  * `UNORDERED_COLLECTION`: 425\n  * `UPGRADE_REQUIRED`: 426\n  * `PRECONDITION_REQUIRED`: 428\n  * `TOO_MANY_REQUESTS`: 429\n  * `REQUEST_HEADER_FIELDS_TOO_LARGE`: 431\n  * `UNAVAILABLE_FOR_LEGAL_REASONS`: 451\n* Server Errors\n  * `INTERNAL_SERVER_ERROR`: 500\n  * `NOT_IMPLEMENTED`: 501\n  * `BAD_GATEWAY`: 502\n  * `SERVICE_UNAVAILABLE`: 503\n  * `GATEWAY_TIMEOUT`: 504\n  * `HTTP_VERSION_NOT_SUPPORTED`: 505\n  * `VARIANT_ALSO_NEGOTIATES`: 506\n  * `INSUFFICIENT_STORAGE`: 507\n  * `LOOP_DETECTED`: 508\n  * `BANDWIDTH_LIMIT_EXCEEDED`: 509\n  * `NOT_EXTENDED`: 510\n  * `NETWORK_AUTHENTICATION_REQUIRED`: 511\n\n\n\n\n\n\nLicense (MIT)\n-------------\n\nCopyright (c) 2015 USRZ.com and Pier Paolo Fumagalli\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of\nthis software and associated documentation files (the \"Software\"), to deal in\nthe Software without restriction, including without limitation the rights to\nuse, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\nthe Software, and to permit persons to whom the Software is furnished to do so,\nsubject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fusrz%2Fjs-express-statuses","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fusrz%2Fjs-express-statuses","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fusrz%2Fjs-express-statuses/lists"}