Files
speckle-server/packages/webhook-service/src/errors.js
T
Iain Sproat af98e9bfd9 fix(webhook): do not log problems connecting to external webhook environment as error severity (#1397)
* fix(webhook): do not log problems connecting to external webhook environment as error severity
- these are user controlled variables and do not necessarily indicate problems with our system
2023-02-21 09:37:24 +00:00

14 lines
338 B
JavaScript

const { VError } = require('verror')
class WebhookError extends VError {
constructor(err, message, responseCode, responseBody) {
const options = { name: new.target.name }
super(options, message)
this.cause = err
this.responseCode = responseCode
this.responseBody = responseBody
}
}
module.exports = WebhookError