🐛 Fix issues with URL being too long when pinging many apps (#1264)

This commit is contained in:
Thomas Camlong
2023-08-12 21:57:20 +02:00
committed by GitHub
parent abb52b093a
commit c8f39033dd
3 changed files with 59 additions and 52 deletions

View File

@@ -23,11 +23,11 @@ export const appRouter = createTRPCRouter({
throw new TRPCError({
code: 'NOT_FOUND',
cause: input,
message: `App ${input} was not found`,
message: `App ${input.id} was not found`,
});
}
const res = await axios
.get(app.url, { httpsAgent: agent, timeout: 2000 })
.get(app.url, { httpsAgent: agent, timeout: 10000 })
.then((response) => ({
status: response.status,
statusText: response.statusText,