9f4cb2b217be174a113bc4c4944af91fdd7a9dd7
[squeep-indie-auther] / src / errors.js
1 'use strict';
2
3 const { Errors } = require('@squeep/api-dingus');
4
5 /**
6 * A stack-less exception for general data issues.
7 */
8 class ValidationError extends Error {
9 constructor(...args) {
10 super(...args);
11 delete this.stack;
12 }
13
14 get name() {
15 return this.constructor.name;
16 }
17 }
18 module.exports = {
19 ...Errors,
20 ValidationError,
21 };