Skip to content

Commit

Permalink
test: still chasing tbconsumer errors
Browse files Browse the repository at this point in the history
  • Loading branch information
matyson committed May 21, 2024
1 parent a3633c4 commit 06c8909
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions apps/deepsirius-ui/src/server/api/routers/tb_consumer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,14 @@ export const tbConsumerRouter = createTRPCRouter({
.object({
status: z.string(),
message: z.string(),

})
.parse(data);

throw new TRPCError({
code: 'INTERNAL_SERVER_ERROR',
message: error.message,
cause: data,
});
}
const parsed = TensorboardResponseSchema.parse(data);
Expand All @@ -61,15 +63,9 @@ export const tbConsumerRouter = createTRPCRouter({
const data: unknown = await res.json();
return data;
} catch (e) {
const error = z
.object({
status: z.string(),
message: z.string(),
})
.parse(e);
throw new TRPCError({
code: 'INTERNAL_SERVER_ERROR',
message: error.message,
message: 'Failed to fetch Tensorboard API',
cause: e,
});
}
Expand Down

0 comments on commit 06c8909

Please sign in to comment.