@sn1006/common 1.0.3 → 1.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,9 @@
1
+ import CustomError from './custom-error';
2
+ export declare class NotFoundError extends CustomError {
3
+ message: string;
4
+ status: number;
5
+ constructor(message: string);
6
+ serializeError(): {
7
+ message: string;
8
+ }[];
9
+ }
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.NotFoundError = void 0;
7
+ const custom_error_1 = __importDefault(require("./custom-error"));
8
+ class NotFoundError extends custom_error_1.default {
9
+ constructor(message) {
10
+ super(message);
11
+ this.message = message;
12
+ this.status = 404;
13
+ Object.setPrototypeOf(this, NotFoundError.prototype);
14
+ }
15
+ serializeError() {
16
+ return [{ message: this.message }];
17
+ }
18
+ }
19
+ exports.NotFoundError = NotFoundError;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sn1006/common",
3
- "version": "1.0.3",
3
+ "version": "1.0.4",
4
4
  "description": "",
5
5
  "main": "./build/index.js",
6
6
  "types": "./build/index.d.ts",