UNPKG

telegram-assistant

Version:

telegram bot will help you to do everything you can setup for him

19 lines (13 loc) 373 B
const moment = require('moment'); class HttpError extends Error { httpStatusCode; timestamp; constructor(httpStatusCode, message = null) { message = message || ''; super(message); this.httpStatusCode = httpStatusCode; this.timestamp = moment().toISOString(); Error.captureStackTrace(this, this.constructor); } } module.exports = HttpError;