error-to-text
v1.0.0
Published
Convert HTTP Error Codes to user-friendly text with descriptions
Downloads
8
Readme
error-to-text
A small and simple package that converts http error codes to a user-friendly text so your users can understand problems on your server.
Usage
Call:
import toText from "error-to-text";
const error = toText(404);
console.log(error.title); // -> Not FoundReturn Object:
{
code: number,
title: string,
description:string
} | undefined