pig-dam-core
Version:
Library that should be included in every Pig DAM project we build
19 lines • 784 B
TypeScript
/**
* Date: 10/29/19
* Time: 9:46 PM
* @license MIT (see project's LICENSE file)
*/
import { PigError } from "../error";
import { FormatErrorModel } from "../types/format";
/**
* What are our error formatting concerns?
* - logging? We are going to log the whole error. Formatted messages are a mess in logs
* - console? Yes, we will either log the message or we will log the whole error if in diagnostics mode
* - responses? Nah, we send back the error or the model.
* So, we are going to supply some tools for getting format friendly data. But its up to you to put it together.
*/
/**
* Converts the error into our own representation of an error
*/
export declare function errorToFormatModel(error: Error | PigError): FormatErrorModel;
//# sourceMappingURL=error.d.ts.map