From 9fa9bb127b06f8852a71dd4b31d5e5eb93409ab0 Mon Sep 17 00:00:00 2001 From: Ulf Gebhardt Date: Thu, 2 Feb 2023 01:54:35 +0100 Subject: [PATCH] error message start with upper case consistency --- backend/src/graphql/resolver/EmailOptinCodes.test.ts | 4 ++-- backend/src/graphql/resolver/UserResolver.ts | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/backend/src/graphql/resolver/EmailOptinCodes.test.ts b/backend/src/graphql/resolver/EmailOptinCodes.test.ts index 92f2ee9d0..988595723 100644 --- a/backend/src/graphql/resolver/EmailOptinCodes.test.ts +++ b/backend/src/graphql/resolver/EmailOptinCodes.test.ts @@ -75,7 +75,7 @@ describe('EmailOptinCodes', () => { query({ query: queryOptIn, variables: { optIn: optinCode } }), ).resolves.toMatchObject({ data: null, - errors: [new GraphQLError('email was sent more than 24 hours ago')], + errors: [new GraphQLError('Email was sent more than 24 hours ago')], }) }) @@ -84,7 +84,7 @@ describe('EmailOptinCodes', () => { mutate({ mutation: setPassword, variables: { code: optinCode, password: 'Aa12345_' } }), ).resolves.toMatchObject({ data: null, - errors: [new GraphQLError('email was sent more than 24 hours ago')], + errors: [new GraphQLError('Email was sent more than 24 hours ago')], }) }) }) diff --git a/backend/src/graphql/resolver/UserResolver.ts b/backend/src/graphql/resolver/UserResolver.ts index 3494db003..3fa148b88 100644 --- a/backend/src/graphql/resolver/UserResolver.ts +++ b/backend/src/graphql/resolver/UserResolver.ts @@ -439,7 +439,7 @@ export class UserResolver { // Code is only valid for `CONFIG.EMAIL_CODE_VALID_TIME` minutes if (!isEmailVerificationCodeValid(userContact.updatedAt || userContact.createdAt)) { throw new LogError( - `email was sent more than ${printTimeDuration(CONFIG.EMAIL_CODE_VALID_TIME)} ago`, + `Email was sent more than ${printTimeDuration(CONFIG.EMAIL_CODE_VALID_TIME)} ago`, ) } logger.debug('EmailVerificationCode is valid...') @@ -515,7 +515,7 @@ export class UserResolver { // Code is only valid for `CONFIG.EMAIL_CODE_VALID_TIME` minutes if (!isEmailVerificationCodeValid(userContact.updatedAt || userContact.createdAt)) { throw new LogError( - `email was sent more than ${printTimeDuration(CONFIG.EMAIL_CODE_VALID_TIME)} ago`, + `Email was sent more than ${printTimeDuration(CONFIG.EMAIL_CODE_VALID_TIME)} ago`, ) } logger.info(`queryOptIn(${optIn}) successful...`)