This commit is contained in:
Belén Curcio
2018-08-21 22:47:39 -03:00
parent ec5cdb5681
commit bace76decc
18 changed files with 38 additions and 78 deletions
@@ -1,4 +0,0 @@
export interface ExceptionError {
message: string;
stack: string;
}
@@ -2,6 +2,5 @@ export { default as NetworkError } from "./networkError";
export { default as UnknownServerError } from "./unknownServerError";
export { default as BadUserInputError } from "./badUserInputError";
export { default as GraphQLError } from "./graphqlError";
export { default as ExceptionError } from "./exceptionError";
export * from "./graphqlError";
+2
View File
@@ -17,6 +17,8 @@ const buildOptions = (inputOptions: RequestInit = {}) => {
return options;
};
// TODO (bc): Wrap response errors into error objects once server errors have been defined
const handleResp = async (res: Response) => {
if (res.status === 404) {
const response = await res.text();