SAP-BTP-Spielwiese/app1/node_modules/@sap/xssec/lib/errors.js

16 lines
434 B
JavaScript
Raw Normal View History

'use strict';
class ServerRequestError extends Error {
constructor (message, code, description) {
super(message);
this.statusCode = code;
this.description = description;
this.name = this.constructor.name;
// capturing the stack trace keeps the reference to your error class
Error.captureStackTrace(this, this.constructor);
}
}
module.exports.ServerRequestError = ServerRequestError;