print error

This commit is contained in:
Peter Maquiran
2024-06-11 12:15:47 +01:00
parent fe51b38257
commit 4c1ad6d648
3 changed files with 3 additions and 2 deletions
@@ -25,7 +25,7 @@ export const RoomByIdOutputDTOSchema = z.object({
roomType: z.number(),
members: z.array(MemberSchema),
}),
});
})
export type RoomByIdMemberItemOutputDTO = z.infer<typeof MemberSchema>
@@ -14,7 +14,7 @@ const RoomListItemOutPutDTOSchema = z.object({
createdAt: z.string(),
expirationDate: z.string().nullable(), // api check
roomType: z.number()
});
})
// Define the schema for the entire response
@@ -10,6 +10,7 @@ export function captureAndReraiseAsync(taskName: string) {
} catch (error) {
// Log the error along with taskName
ColoredLoggerService.error('Capture error from', taskName, error)
console.error(error)
// Re-throw the same error
return err(error) ;
}