error-extractor
v1.0.1
Published
Extract error message from an object using known error properties.
Downloads
16
Maintainers
Readme
error-extractor
Extract error message from an object using known error properties.
Installation:
npm i error-extractor
Usage:
import { errorExtractor } from "error-extractor";
try {
// Some code...
}
catch(err: any) {
const errorMessage = errorExtractor.getError(err);
// Do something with errorMessage...
}