uptime-kuma/server/translatable-error.js
Cyril59310 fc832d0935
feat: Added a translation key for “Password is too weak (#6614)
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Frank Elsinga <frank@elsinga.de>
2026-01-06 20:53:51 +00:00

17 lines
449 B
JavaScript

class TranslatableError extends Error {
/**
* Error whose message is a translation key.
* @augments Error
*/
/**
* Create a TranslatableError.
* @param {string} key - Translation key present in src/lang/en.json
*/
constructor(key) {
super(key);
this.msgi18n = true;
this.key = key;
Error.captureStackTrace(this, this.constructor);
}
}
module.exports = TranslatableError;