add a specific error on the BE when the Token Salt token is missing

Co-authored-by: Christian <christiancp100@gmail.com>
This commit is contained in:
Simone Taeggi 2023-03-09 14:44:20 +01:00
parent cf334338b4
commit 26d9f6c8e0

View File

@ -12,8 +12,11 @@ module.exports = () => async (ctx, next) => {
}
if (!hasValidTokenSalt()) {
return ctx.notImplemented(
'The server configuration for data transfer is invalid. Please contact your server administrator.'
return ctx.badRequest(
'The server configuration for data transfer is invalid. Please contact your server administrator.',
{
code: 'INVALID_TOKEN_SALT',
}
);
}