mindee
Version:
Mindee Client Library for Node.js
16 lines (15 loc) • 488 B
JavaScript
import { MindeeError } from "../../errors/index.js";
/**
* HTTP error returned by the API.
*/
export class MindeeHttpErrorV2 extends MindeeError {
constructor(error) {
super(`HTTP ${error.status} - ${error.title} :: ${error.code} - ${error.detail}`);
this.status = error.status;
this.detail = error.detail;
this.title = error.title;
this.code = error.code;
this.errors = error.errors;
this.name = "MindeeHttpErrorV2";
}
}