aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/controllers/api/search.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/controllers/api/search.ts')
-rw-r--r--server/controllers/api/search.ts10
1 files changed, 8 insertions, 2 deletions
diff --git a/server/controllers/api/search.ts b/server/controllers/api/search.ts
index f0cdf3a89..77e3a024d 100644
--- a/server/controllers/api/search.ts
+++ b/server/controllers/api/search.ts
@@ -102,7 +102,10 @@ async function searchVideoChannelsIndex (query: VideoChannelsSearchQuery, res: e
102 } catch (err) { 102 } catch (err) {
103 logger.warn('Cannot use search index to make video channels search.', { err }) 103 logger.warn('Cannot use search index to make video channels search.', { err })
104 104
105 return res.sendStatus(HttpStatusCode.INTERNAL_SERVER_ERROR_500) 105 return res.fail({
106 status: HttpStatusCode.INTERNAL_SERVER_ERROR_500,
107 message: 'Cannot use search index to make video channels search'
108 })
106 } 109 }
107} 110}
108 111
@@ -202,7 +205,10 @@ async function searchVideosIndex (query: VideosSearchQuery, res: express.Respons
202 } catch (err) { 205 } catch (err) {
203 logger.warn('Cannot use search index to make video search.', { err }) 206 logger.warn('Cannot use search index to make video search.', { err })
204 207
205 return res.sendStatus(HttpStatusCode.INTERNAL_SERVER_ERROR_500) 208 return res.fail({
209 status: HttpStatusCode.INTERNAL_SERVER_ERROR_500,
210 message: 'Cannot use search index to make video search'
211 })
206 } 212 }
207} 213}
208 214