forked from Yara724/api
YARA-937
This commit is contained in:
@@ -12,6 +12,10 @@ import {
|
||||
Logger,
|
||||
NotFoundException,
|
||||
} from "@nestjs/common";
|
||||
import {
|
||||
BusinessErrorCode,
|
||||
BusinessRuleException,
|
||||
} from "./exceptions/business-rule.exception";
|
||||
import { distance as stringDistance } from "fastest-levenshtein"; // حتما نصب بشه
|
||||
import { Types } from "mongoose";
|
||||
import { lastValueFrom } from "rxjs";
|
||||
@@ -3013,7 +3017,8 @@ export class ExpertClaimService {
|
||||
}
|
||||
|
||||
if (existingResend?.fulfilledAt) {
|
||||
throw new BadRequestException(
|
||||
throw new BusinessRuleException(
|
||||
BusinessErrorCode.DAMAGE_EXPERT_RESEND_LIMIT_EXCEEDED,
|
||||
"The owner has already fulfilled a damage-expert resend for this claim. You cannot request another resend.",
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user