Skip to content

Commit

Permalink
Merge branch 'feat/send-ticket' of github.com:ungdev/UA-api into feat…
Browse files Browse the repository at this point in the history
…/send-ticket
  • Loading branch information
Antoine D committed Dec 2, 2024
2 parents 8e00b32 + e4f6407 commit ea31daa
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/operations/user.ts
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,16 @@ export const fetchOrgas = async (): Promise<Orga[]> => {
},
},
});
return orgas.map(formatOrga);
return orgas
.map((orga) => {
try {
return formatOrga(orga);
} catch (error) {
logger.error(`Error while formatting orga ${orga.id}`, error);
return null;
}
})
.filter((orga) => orga !== null);
};

export const createUser = async (user: {
Expand Down

0 comments on commit ea31daa

Please sign in to comment.