separate validateClientIdentifier from fetchClientIdentifier, add validateProfile
[squeep-indieauth-helper] / lib / errors.js
diff --git a/lib/errors.js b/lib/errors.js
new file mode 100644 (file)
index 0000000..faccd70
--- /dev/null
@@ -0,0 +1,16 @@
+'use strict';
+
+class ValidationError extends Error {
+  constructor(...args) {
+    super(...args);
+    delete this.stack;
+  }
+
+  get name() {
+    return this.constructor.name;
+  }
+}
+
+module.exports = {
+  ValidationError,
+};
\ No newline at end of file