{"library":"httperr","type":"library","category":null,"description":"The `httperr` package provides a comprehensive set of JavaScript Error types, each corresponding to a standard HTTP status code. It is designed to address common issues found in similar libraries, such as incorrect stack trace capture and limited support for status codes. `httperr` version 1.0.0 is stable but appears to be in maintenance mode, with infrequent updates. A key differentiator is its ability to associate arbitrary additional data with an error object during instantiation, allowing for context-rich error handling without losing the semantic meaning of HTTP status codes. This enables developers to separate error handling logic from the final error response generation, enhancing flexibility and clarity, especially when dealing with specific HTTP headers like `Allow` or `Retry-After` for certain error types.","language":"javascript","status":"maintenance","version":"1.0.0","tags":["javascript","http","errors","error","request","response","errorclass"],"last_verified":"Wed May 27","install":[{"cmd":"npm install httperr","imports":["const httperr = require('httperr');","const { NotFound } = require('httperr');\n// or\nconst httperr = require('httperr');\nconst err = new httperr.NotFound('Resource not found');","const httperr = require('httperr');\nconst err = httperr[404]('The path could not be resolved');"]},{"cmd":"yarn add httperr","imports":[]},{"cmd":"pnpm add httperr","imports":[]}],"homepage":null,"github":"https://github.com/pluma/httperr","docs":null,"changelog":null,"pypi":null,"npm":"https://www.npmjs.com/package/httperr","openapi_spec":null,"status_page":null,"smithery":null,"compatibility":{"summary":{"python_range":"18–22","success_rate":0,"avg_install_s":null,"avg_import_s":null,"wheel_type":null},"url":"https://checklist.day/v1/registry/httperr/compatibility"}}