diff options
author | Rigel Kent <sendmemail@rigelk.eu> | 2021-06-01 01:36:53 +0200 |
---|---|---|
committer | Chocobozzz <chocobozzz@cpy.re> | 2021-06-02 16:57:07 +0200 |
commit | 76148b27f7501bac061992136852be4303370c8d (patch) | |
tree | fc0559253e833c9252fa14ebaec5321d88bfb4e8 /server/lib | |
parent | 5ed25fb76e920dac364cb9ef46f14ec4bd372949 (diff) | |
download | PeerTube-76148b27f7501bac061992136852be4303370c8d.tar.gz PeerTube-76148b27f7501bac061992136852be4303370c8d.tar.zst PeerTube-76148b27f7501bac061992136852be4303370c8d.zip |
refactor API errors to standard error format
Diffstat (limited to 'server/lib')
-rw-r--r-- | server/lib/client-html.ts | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/server/lib/client-html.ts b/server/lib/client-html.ts index 3c09332b5..4068e3d7b 100644 --- a/server/lib/client-html.ts +++ b/server/lib/client-html.ts | |||
@@ -549,11 +549,11 @@ async function serveIndexHTML (req: express.Request, res: express.Response) { | |||
549 | return | 549 | return |
550 | } catch (err) { | 550 | } catch (err) { |
551 | logger.error('Cannot generate HTML page.', err) | 551 | logger.error('Cannot generate HTML page.', err) |
552 | return res.sendStatus(HttpStatusCode.INTERNAL_SERVER_ERROR_500) | 552 | return res.status(HttpStatusCode.INTERNAL_SERVER_ERROR_500).end() |
553 | } | 553 | } |
554 | } | 554 | } |
555 | 555 | ||
556 | return res.sendStatus(HttpStatusCode.NOT_ACCEPTABLE_406) | 556 | return res.status(HttpStatusCode.NOT_ACCEPTABLE_406).end() |
557 | } | 557 | } |
558 | 558 | ||
559 | // --------------------------------------------------------------------------- | 559 | // --------------------------------------------------------------------------- |