зеркало из https://github.com/microsoft/ghcrawler.git
Dashboard fails if queue does not exist
This commit is contained in:
Родитель
380be04da3
Коммит
a9a55780b8
|
@ -17,7 +17,12 @@ router.put('/:name', auth.validate, wrap(function* (request, response) {
|
|||
}));
|
||||
|
||||
router.get('/:name/info', auth.validate, wrap(function* (request, response) {
|
||||
const info = yield crawlerService.getQueueInfo(request.params.name);
|
||||
let info = null;
|
||||
try {
|
||||
info = yield crawlerService.getQueueInfo(request.params.name);
|
||||
} catch (error) {
|
||||
return response.sendStatus(404);
|
||||
}
|
||||
if (!info) {
|
||||
return response.sendStatus(404);
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче