@iak-id/iak-api-server-js
Version:
Node.js-based SDK (server-side-only) to easily help integrating IAK API Services with your app.
18 lines (15 loc) • 352 B
JavaScript
class ApiError extends Error {
constructor(statusCode = 500, responseCode = '201', message = 'UNDEFINED RESPONSE CODE', details = '') {
super(message);
this.status = 'failed';
this.code = statusCode;
this.data = {
rc: responseCode,
message,
details,
};
}
}
module.exports = {
ApiError,
};