Browse Source

improved InvalidGrowiCommandError class with extensible-custom-error

kaori 4 years ago
parent
commit
8bfc141b86
1 changed files with 2 additions and 8 deletions
  1. 2 8
      packages/slack/src/models/errors.ts

+ 2 - 8
packages/slack/src/models/errors.ts

@@ -1,9 +1,3 @@
-export class InvalidGrowiCommandError extends Error {
+import ExtensibleCustomError from 'extensible-custom-error';
 
-  constructor(e?: string) {
-    super(e);
-    this.name = new.target.name;
-    Object.setPrototypeOf(this, new.target.prototype);
-  }
-
-}
+export class InvalidGrowiCommandError extends ExtensibleCustomError {}