wkr-util
Version:
Utility library for wkr project.
14 lines (11 loc) • 377 B
JavaScript
function ResponseError(status, data, message) {
this.name = 'ResponseError'
this.message = message
Error.call(this, message)
Error.captureStackTrace(this, this.constructor)
this.status = status
this.data = data
}
ResponseError.prototype = Object.create(Error.prototype)
ResponseError.prototype.constructor = ResponseError
export default ResponseError