This is part of a rewrite for Dimension to better support integrations. Only the bare minimum scalar APIs are implemented at this point - dimension is non-functional.
14 lines
395 B
TypeScript
14 lines
395 B
TypeScript
export class ApiError {
|
|
|
|
public statusCode: number;
|
|
public jsonResponse: any;
|
|
|
|
constructor(statusCode: number, json: any) {
|
|
// Because typescript is just plain dumb
|
|
// https://stackoverflow.com/questions/31626231/custom-error-class-in-typescript
|
|
Error.apply(this, ["ApiError"]);
|
|
|
|
this.jsonResponse = json;
|
|
this.statusCode = statusCode;
|
|
}
|
|
} |