1
0
forked from Yara724/api
This commit is contained in:
SepehrYahyaee
2026-07-11 12:23:00 +03:30
parent da3f57870e
commit 7a3ddcc7be
3 changed files with 45 additions and 2 deletions

View File

@@ -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.",
);
}