migrate ResourceAuthenticator into here from separate package
[squeep-authentication-module] / lib / errors.js
index 98a6f182921185a8f0b4951b4d1439cb4606c76a..5f646ab31f1d7089ad209bbc2cb681bc1ae6b029 100644 (file)
@@ -2,6 +2,17 @@
 
 const { Errors } = require('@squeep/api-dingus');
 
+class ResourceAuthenticatorError extends Error {
+  constructor(...args) {
+    super(...args);
+    delete this.stack;
+  }
+  get name() {
+    return this.constructor.name;
+  }
+}
+
 module.exports = {
+  ResourceAuthenticatorError,
   ...Errors,
 };
\ No newline at end of file