Skip to content

Commit

Permalink
refactor. return the errors in axios calls
Browse files Browse the repository at this point in the history
  • Loading branch information
abinaya-u committed Oct 31, 2023
1 parent fa5fd72 commit 44565c5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/hooks/useFetchMedications.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export const useFetchMedications = (patientUuid, forDate) => {
const response = await fetchMedications(patientUuid, forDate);
setDrugChartData(response.data);
} catch (e) {
console.log(e);
return e;
} finally {
setLoading(false);
}
Expand Down

0 comments on commit 44565c5

Please sign in to comment.