Update user friendly errors for translations (#15000)
Force msg typing instead of string for user friendly errors
This commit is contained in:
@@ -5,7 +5,7 @@ import {
|
||||
} from '@nestjs/common';
|
||||
import { GqlExecutionContext } from '@nestjs/graphql';
|
||||
|
||||
import { t } from '@lingui/core/macro';
|
||||
import { msg } from '@lingui/core/macro';
|
||||
|
||||
import {
|
||||
CaptchaException,
|
||||
@@ -41,7 +41,9 @@ export class CaptchaGuard implements CanActivate {
|
||||
throw new CaptchaException(
|
||||
'Invalid Captcha, please try another device',
|
||||
CaptchaExceptionCode.INVALID_CAPTCHA,
|
||||
{ userFriendlyMessage: t`Invalid Captcha, please try another device` },
|
||||
{
|
||||
userFriendlyMessage: msg`Invalid Captcha, please try another device`,
|
||||
},
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user