Skip to content

Commit

Permalink
fix(js-sdk): Enforcing type of artifacts
Browse files Browse the repository at this point in the history
  • Loading branch information
jzanecook committed Nov 27, 2023
1 parent 1fed2e2 commit 1787ee9
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions packages/sdk/js/src/agent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,9 @@ const registerGetArtifacts: RouteRegisterFn = (router: Router) => {
const taskId = req.params.task_id
try {
const artifacts = await getArtifacts(taskId)
if (artifacts == undefined) {
return res.status(404).json({ error: `Task with id ${taskId} not found` })
}
const current_page = Number(req.query['current_page']) || 1
const page_size = Number(req.query['page_size']) || 10

Expand Down

0 comments on commit 1787ee9

Please sign in to comment.