690406:2310 Done Task BE-ERR-01
CI / CD Pipeline / build (push) Failing after 4m53s
CI / CD Pipeline / deploy (push) Has been skipped

This commit is contained in:
2026-04-06 23:10:56 +07:00
parent c95e0f537e
commit 961ee72343
24 changed files with 1329 additions and 268 deletions
@@ -1,4 +1,5 @@
import { Injectable, BadRequestException, Logger } from '@nestjs/common';
import { Injectable, Logger } from '@nestjs/common';
import { ValidationException } from '../../common/exceptions';
import { InjectRepository } from '@nestjs/typeorm';
import { Repository, DataSource } from 'typeorm';
import { UserAssignment } from './entities/user-assignment.entity';
@@ -22,7 +23,7 @@ export class UserAssignmentService {
(v) => v != null
);
if (scopes.length > 1) {
throw new BadRequestException(
throw new ValidationException(
'Cannot assign multiple scopes at once. Choose one of Org, Project, or Contract.'
);
}
@@ -55,7 +56,7 @@ export class UserAssignmentService {
// Validation (Scope)
const scopes = [organizationId, projectId].filter((v) => v != null);
if (scopes.length > 1) {
throw new BadRequestException(
throw new ValidationException(
`User ${userId}: Cannot assign multiple scopes.`
);
}