Skip to content

Commit

Permalink
feat: streamline error handling in useImportEventsForm by removing re…
Browse files Browse the repository at this point in the history
…dundant checks
  • Loading branch information
D3nnis38 committed Nov 29, 2024
1 parent a8635a5 commit b1a07f5
Showing 1 changed file with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,8 @@ export const useImportEventsForm = () => {
setImportErrorText('');
setUploadStatus('success');
} catch (error: AxiosError | any) {
if (error) {
setUploadStatus('error');
setImportErrorText(error.response.data.message);
}
setUploadStatus('error');
setImportErrorText(error.response.data.message);
}
setIsLoading(false);
};
Expand Down

0 comments on commit b1a07f5

Please sign in to comment.