775ac7b58c
you must login with an BTP account in order to see the app
16 lines
No EOL
434 B
JavaScript
16 lines
No EOL
434 B
JavaScript
'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; |