diff --git a/src/adapters/postgres/cohortMembers-adapter.ts b/src/adapters/postgres/cohortMembers-adapter.ts index cab2aa76..3912ac79 100644 --- a/src/adapters/postgres/cohortMembers-adapter.ts +++ b/src/adapters/postgres/cohortMembers-adapter.ts @@ -341,9 +341,9 @@ export class PostgresCohortMembersService { return APIResponse.error( res, apiId, - API_RESPONSES.USER_NOTFOUND, + API_RESPONSES.USER_NOT_MEMBER_OF_COHORT, API_RESPONSES.NOT_FOUND, - HttpStatus.OK + HttpStatus.NOT_FOUND ); } userYearExistInYear = getYearExitUser.map( diff --git a/src/common/utils/response.messages.ts b/src/common/utils/response.messages.ts index 27550219..4a837f26 100644 --- a/src/common/utils/response.messages.ts +++ b/src/common/utils/response.messages.ts @@ -48,6 +48,7 @@ export const API_RESPONSES = { TENANT_ID_NOTFOUND: '"Invalid input: TenantId must be a valid UUID."', COHORT_NOTFOUND: 'Cohort not exist for this year.', USER_NOTFOUND: 'User not exist for this year.', + USER_NOT_MEMBER_OF_COHORT: 'User is not a member of any cohort', USER_DETAIL_NOTFOUND: 'User details not found', COHORT_GET_SUCCESSFULLY: 'Cohort members details fetched successfully.', COHORT_USER_NOTFOUND: 'User not exist in this cohort for this year.',