File tree Expand file tree Collapse file tree
services/libs/common/src/i18n Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1443,15 +1443,16 @@ export default class IntegrationService {
14431443 const errorType = String ( error . response . data . type )
14441444 const isTwoFactorRequired =
14451445 errorType . includes ( 'two_factor_required' ) || errorType . includes ( '2nd_factor_required' )
1446+
14461447 if ( isTwoFactorRequired ) {
1447- throw new Error400 ( this . options . language , 'Two-factor authentication code is required ' )
1448+ throw new Error400 ( this . options . language , 'errors.groupsio.isTwoFactorRequired ' )
14481449 }
14491450 const invalidCredentials =
14501451 errorType . includes ( 'invalid password' ) || errorType . includes ( 'invalid email' )
1451- if ( invalidCredentials ) throw new Error400 ( this . options . language , 'Invalid email or password' )
1452+ if ( invalidCredentials )
1453+ throw new Error400 ( this . options . language , 'errors.groupsio.invalidCredentials' )
14521454 const invalid2FA = errorType . includes ( '2nd_factor_wrong' )
1453- if ( invalid2FA )
1454- throw new Error400 ( this . options . language , 'Invalid Two-factor authentication code' )
1455+ if ( invalid2FA ) throw new Error400 ( this . options . language , 'errors.groupsio.invalid2FA' )
14551456 throw error
14561457 }
14571458 }
Original file line number Diff line number Diff line change @@ -160,6 +160,11 @@ const en = {
160160 invalidCredentials :
161161 'The given credentials were found to be invalid. Please check the credentials and try again' ,
162162 } ,
163+ groupsio : {
164+ isTwoFactorRequired : 'Two-factor authentication code is required' ,
165+ invalidCredentials : 'Invalid email or password' ,
166+ invalid2FA : 'Invalid Two-factor authentication code' ,
167+ } ,
163168 alreadyExists : '{0}' ,
164169 } ,
165170
You can’t perform that action at this time.
0 commit comments