UNPKG

@sap/xssec

Version:

XS Advanced Container Security API for node.js

15 lines (12 loc) 470 B
const NetworkError = require("./NetworkError"); class ResponseError extends NetworkError { constructor(url, request, responseCode, responseText, message = `HTTP response from ${url} was ${responseCode}: ${responseText}.`) { super(message); this.name = "ResponseError"; this.url = url; this.request = request; this.responseCode = responseCode; this.responseText = responseText } } module.exports = ResponseError;