CEC-1691 Handle 503 errors (#156)

This commit is contained in:
John Wu
2022-05-18 16:02:13 -07:00
committed by GitHub
parent 8fde694801
commit 23111f9c3a
8 changed files with 206 additions and 104 deletions

View File

@@ -1,4 +1,8 @@
import { getAuthHeaderOptions, fetchRespHandler } from "../utils/http";
import {
errorHandler,
getAuthHeaderOptions,
fetchRespHandler,
} from "../utils/http";
const API_ENDPOINT = process.env.REACT_APP_CERT_SERVICE_URL;
@@ -11,7 +15,9 @@ const certificatesAPI = {
getAuthHeaderOptions(token)
),
body: JSON.stringify(data),
}).then(fetchRespHandler),
})
.then(fetchRespHandler)
.catch(errorHandler),
};
export default certificatesAPI;