UNPKG

@di-zed/yandex-smart-home

Version:

The Yandex Smart Home skills for the different device types.

27 lines (26 loc) 671 B
"use strict"; /** * @author DiZed Team * @copyright Copyright (c) DiZed Team (https://github.com/di-zed/) */ Object.defineProperty(exports, "__esModule", { value: true }); /** * Application Error. */ class AppError extends Error { /** * App Error Constructor. * * @param message * @param statusCode */ constructor(message, statusCode) { super(message); this.name = 'AppError'; this.statusCode = statusCode; this.status = `${statusCode}`.startsWith('4') ? 'fail' : 'error'; this.isOperational = true; Error.captureStackTrace(this, this.constructor); } } exports.default = AppError;