Skip to content
Snippets Groups Projects
Commit d96fa64f authored by Xiao Gui's avatar Xiao Gui
Browse files

bugfix: catch dns not found error

parent 555a4988
No related branches found
No related tags found
No related merge requests found
......@@ -169,8 +169,8 @@ datasetsRouter.get('/kgInfo', checkKgQuery, cacheMaxAge24Hr, async (req, res) =>
const { kgId } = req.query
const { user } = req
try{
const stream = await getDatasetFromId({ user, kgId, returnAsStream: true }).on('error', getHandleErrorFn(req, res))
stream.pipe(res)
const stream = await getDatasetFromId({ user, kgId, returnAsStream: true })
stream.on('error', getHandleErrorFn(req, res)).pipe(res)
}catch(e){
getHandleErrorFn(req, res)(e)
}
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment