diff options
Diffstat (limited to 'app/Exceptions')
-rw-r--r-- | app/Exceptions/Handler.js | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/app/Exceptions/Handler.js b/app/Exceptions/Handler.js index 94d7246..efa2e0b 100644 --- a/app/Exceptions/Handler.js +++ b/app/Exceptions/Handler.js | |||
@@ -23,6 +23,8 @@ class ExceptionHandler extends BaseExceptionHandler { | |||
23 | async handle (error, { request, response }) { | 23 | async handle (error, { request, response }) { |
24 | if (error.name === 'ValidationException') { | 24 | if (error.name === 'ValidationException') { |
25 | return response.status(400).send('Invalid arguments') | 25 | return response.status(400).send('Invalid arguments') |
26 | } else if (error.name === 'InvalidSessionException') { | ||
27 | return response.status(401).redirect('/user/login'); | ||
26 | } | 28 | } |
27 | 29 | ||
28 | response.status(error.status).send(error.message) | 30 | response.status(error.status).send(error.message) |