Skip to content

Commit

Permalink
init try catch (#44)
Browse files Browse the repository at this point in the history
* Task #230243 fix code rabit issue

* Task #230243 fix height fix

* Task #230243 fix height, remove block not used change case

* Task #230243 fix try catch issue

* Task #230243 fix try catch issue
  • Loading branch information
namita-25 authored Nov 29, 2024
1 parent 155e2fd commit 601e3d0
Showing 1 changed file with 15 additions and 15 deletions.
30 changes: 15 additions & 15 deletions src/services/benefit/benefits.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -104,22 +104,22 @@ export const applyApplication = async ({
},
},
};
try {
const tokenData = await getToken();
if (!tokenData || !tokenData.token) {
throw new Error("Token not found");
}
const token = localStorage.getItem("authToken");
const response = await axios.post(`${apiBaseUrl}/init`, loginData, {
headers: {
"Content-Type": "application/json",
Authorization: `Bearer ${token}`,
},
});
return response || {};
} catch (error) {
handleError(error);
// try {
const tokenData = await getToken();
if (!tokenData || !tokenData.token) {
throw new Error("Token not found");
}
const token = localStorage.getItem("authToken");
const response = await axios.post(`${apiBaseUrl}/init`, loginData, {
headers: {
"Content-Type": "application/json",
Authorization: `Bearer ${token}`,
},
});
return response || {};
// } catch (error) {
// handleError(error);
// }
};
interface ConfirmApplicationParams {
submission_id: string | undefined;
Expand Down

0 comments on commit 601e3d0

Please sign in to comment.