forked from Yara724/api
YARA-1074
This commit is contained in:
@@ -8213,13 +8213,16 @@ export class RequestManagementService {
|
|||||||
const licenseNumber = partyData.driverIsInsurer
|
const licenseNumber = partyData.driverIsInsurer
|
||||||
? partyData.insurerLicense
|
? partyData.insurerLicense
|
||||||
: partyData.driverLicense;
|
: partyData.driverLicense;
|
||||||
if (!licenseNationalCode || !licenseNumber) {
|
|
||||||
throw new BadRequestException(
|
if (!licenseNumber) {
|
||||||
`${roleLabel} party driving license inquiry requires national code and ${
|
this.recordPartyCaseInquiryStatus(
|
||||||
partyData.driverIsInsurer ? "insurerLicense" : "driverLicense"
|
req,
|
||||||
}.`,
|
"drivingLicence",
|
||||||
|
partyRole,
|
||||||
|
false,
|
||||||
|
{ skipped: true, reason: "No license number provided" },
|
||||||
);
|
);
|
||||||
}
|
} else {
|
||||||
try {
|
try {
|
||||||
const licenseInquiry = await this.sandHubService.getDrivingLicenseInfo(
|
const licenseInquiry = await this.sandHubService.getDrivingLicenseInfo(
|
||||||
licenseNationalCode,
|
licenseNationalCode,
|
||||||
@@ -8249,6 +8252,7 @@ export class RequestManagementService {
|
|||||||
`${roleLabel} party driving license inquiry failed: ${err?.message || "استعلام در دسترس نیست"}`,
|
`${roleLabel} party driving license inquiry failed: ${err?.message || "استعلام در دسترس نیست"}`,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return { clientId };
|
return { clientId };
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user