egg-errors
Advanced tools
Comparing version 2.2.2 to 2.2.3
2.2.3 / 2021-07-29 | ||
================== | ||
**fixes** | ||
* [[`c3a89cc`](http://github.com/eggjs/egg-errors/commit/c3a89ccefe2370deb5400729fdad106dc6e84a52)] - fix: faq url append twice (#12) (mansonchor.github.com <<mansonchor1987@gmail.com>>) | ||
2.2.2 / 2021-04-06 | ||
@@ -3,0 +9,0 @@ ================== |
@@ -10,5 +10,6 @@ "use strict"; | ||
static format(err) { | ||
const faqPrefix = this.faqPrefixEnv || this.faqPrefix; | ||
let errMessage = err.message; | ||
if (framework_base_error_1.FrameworkBaseError.isFrameworkError(err)) { | ||
errMessage += ` [${this.faqPrefixEnv || this.faqPrefix}/${err.code}]`; | ||
if (framework_base_error_1.FrameworkBaseError.isFrameworkError(err) && !errMessage.includes(faqPrefix)) { | ||
errMessage += ` [${faqPrefix}/${err.code}]`; | ||
} | ||
@@ -19,4 +20,5 @@ const errStack = err.stack || 'no_stack'; | ||
static formatError(err) { | ||
if (framework_base_error_1.FrameworkBaseError.isFrameworkError(err)) { | ||
err.message += ` [${this.faqPrefixEnv || this.faqPrefix}/${err.code}]`; | ||
const faqPrefix = this.faqPrefixEnv || this.faqPrefix; | ||
if (framework_base_error_1.FrameworkBaseError.isFrameworkError(err) && !err.message.includes(faqPrefix)) { | ||
err.message += ` [${faqPrefix}/${err.code}]`; | ||
} | ||
@@ -29,2 +31,2 @@ return err; | ||
FrameworkErrorFormater.faqPrefixEnv = process.env.EGG_FRAMEWORK_ERR_FAQ_PERFIX; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZm9ybWF0dGVyLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiZm9ybWF0dGVyLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7OztBQUFBLGlFQUE0RDtBQUM1RCw2QkFBNkI7QUFDN0IseUJBQXlCO0FBQ3pCLE1BQU0sUUFBUSxHQUFH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BQUMsQ0FBQyxFQUM5QyxHQUFHLENBQUMsSUFBSSxFQUNSLEdBQUcsQ0FBQyxZQUFZLEVBQ2hCLEdBQUcsQ0FBQyxZQUFZLEVBQ2hCLE9BQU8sQ0FBQyxHQUFHLEVBQ1gsUUFBUSxDQUNULENBQUM7SUFDSixDQUFDO0lBRUQsTUFBTSxDQUFDLFdBQVcsQ0FBa0IsR0FBTTtRQUN4QyxNQUFNLFNBQVMsR0FBRyxJQUFJLENBQUMsWUFBWSxJQUFJLElBQUksQ0FBQyxTQUFTLENBQUM7UUFDdEQsSUFBSSx5Q0FBa0IsQ0FBQyxnQkFBZ0IsQ0FBQyxHQUFHLENBQUMsSUFBSSxDQUFDLEdBQUcsQ0FBQyxPQUFPLENBQUMsUUFBUSxDQUFDLFNBQVMsQ0FBQyxFQUFFO1lBQ2hGLEdBQUcsQ0FBQyxPQUFPLElBQUksS0FBSyxTQUFTLElBQUksR0FBRyxDQUFDLElBQUksR0FBRyxDQUFDO1NBQzlDO1FBQ0QsT0FBTyxHQUFHLENBQUM7SUFDYixDQUFDOztBQTlCSCx3REErQkM7QUE5QmtCLGdDQUFTLEdBQUcsNkJBQTZCLENBQUM7QUFDNUMsbUNBQVksR0FBRyxPQUFPLENBQUMsR0FBRyxDQUFDLDRCQUE0QixDQUFDIn0= |
{ | ||
"name": "egg-errors", | ||
"version": "2.2.2", | ||
"version": "2.2.3", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "scripts": { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
93746
1135