|
@@ -3,12 +3,12 @@ import { GraphQLError } from "graphql";
|
|
|
import { get as get_token } from "./reducers/session";
|
|
import { get as get_token } from "./reducers/session";
|
|
|
|
|
|
|
|
export class HttpError extends Error {
|
|
export class HttpError extends Error {
|
|
|
- constructor(
|
|
|
|
|
- public status: number,
|
|
|
|
|
- message?: string
|
|
|
|
|
- ) {
|
|
|
|
|
|
|
+ status: number;
|
|
|
|
|
+
|
|
|
|
|
+ constructor(status: number, message?: string) {
|
|
|
super(message ?? `HTTP ${status}`);
|
|
super(message ?? `HTTP ${status}`);
|
|
|
this.name = "HttpError";
|
|
this.name = "HttpError";
|
|
|
|
|
+ this.status = status;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|