UNPKG

janus-admin

Version:

JanusAdmin is a node.js http client that implements the admin interface of the Janus WebRTC Gateway

21 lines (16 loc) 434 B
'use strict'; var assert = require('chai').assert; /** * @class */ class ResponseError extends Error { constructor(res) { super(); assert.equal(res.isError(), true, 'No error found in response'); this.name = this.constructor.name; this.message = res.getErrorMessage(); this.code = res.getErrorCode(); this.response = res; } } module.exports.ResponseError = ResponseError;