Skip to content

Commit

Permalink
fix: revert gestion d'erreur
Browse files Browse the repository at this point in the history
  • Loading branch information
remy-auricoste committed Nov 6, 2023
1 parent e90e697 commit 8961f92
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ui/utils/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,8 @@ export const getEntrepriseInformation = async (siret: string, options: { cfa_del
return data
} catch (error: any) {
captureException(error)
if (error?.statusCode === 400) {
return error.errorData
if (error.context?.statusCode === 400) {
return error.context.errorData
} else {
return { statusCode: 500, message: "unkown error", error: true }
}
Expand Down

0 comments on commit 8961f92

Please sign in to comment.