CEC-1691 Handle 503 errors (#156)
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user