friendly-http-status
TypeScript icon, indicating that this package has built-in type declarations

1.0.0 • Public • Published

Friendly Http Status

Translates http status code to minimal friendly object containing description and emoji 😃

🔧 Installation

npm i friendly-http-status

📦 Usage

import { getFriendlyError } from "friendly-http-status";
 
console.log(getFriendlyError(404));

👀 Response

getFriendlyError always returns json object with following property even if code unknown it will return unknown error object

{
  "emoji": "",
  "message": "Not Found",
  "description": "The requested page could not be found but may be available again in the future."
}

🤠 Credits

Readme

Keywords

none

Package Sidebar

Install

npm i friendly-http-status

Weekly Downloads

3

Version

1.0.0

License

MIT

Unpacked Size

109 kB

Total Files

11

Last publish

Collaborators

  • harshzalavadiya