forked from Yara724/api
invalid image formats after two retries skips
This commit is contained in:
@@ -24,6 +24,7 @@ source: fanavaran-module-docs
|
||||
| Missing PolicyId | No/expired policies messages | Block submit; preview may leave null | Manual after data fix | Stage fail history | Admin |
|
||||
| Duplicate create | Local `claimId`/`claimNo` exists | Skip create; use follow-ups | N/A | skipReason | — |
|
||||
| Invalid FileTypeId | `نوع فايل با منبع لوکاپ مطابقت ندارد` | Set `ClaimFileTypeId` from tenant `file-types` (Parsian **63**) | After config fix | Attachment stage | Ops |
|
||||
| Invalid file bytes | `فرمت فایل معتبر نیست` | File is not a real JPEG/PNG/PDF (wrong magic bytes / empty / WEBP-as-jpg). YARA now sniffs magic + sets multipart `contentType` before upload | After replacing the file | Attachment stage | Ops / user re-upload |
|
||||
| Expertise not ready | `Fanavaran expertise payload is not ready` + warnings | Wait for priced parts / factor | Auto when ready | — | Expert UI |
|
||||
| Network / 5xx | Axios / gateway errors | Stage failed + schedule retry | Up to `maxRetries` (2) | Audit | Ops |
|
||||
| Max retries exhausted | Logged warn | Manual submit only | Stop auto | Stage status | Ops |
|
||||
|
||||
@@ -82,8 +82,15 @@ Existing claim/damage IDs and successful image receipts are reused. A previously
|
||||
skipped attachment stage is retried. Completion is checked against a fresh read
|
||||
of the saved receipts for all current local image candidates, not just the
|
||||
attachment stage's status or an upload response saying success. Missing local
|
||||
files, rejected uploads, and unconfirmed receipts stop expertise submission.
|
||||
If there are no local attachment candidates, there is nothing to upload.
|
||||
files, non-format rejected uploads, and unconfirmed receipts stop expertise
|
||||
submission. If there are no local attachment candidates, there is nothing to
|
||||
upload.
|
||||
|
||||
Invalid file format (`فرمت فایل معتبر نیست` / local magic-byte rejection) is
|
||||
retried once in the same submit. If the second attempt still fails, the file is
|
||||
permanently waived (`FANAVARAN_ATTACHMENT_FORMAT_WAIVED` on the skipped attempt).
|
||||
Waived files count as handled: they are not re-uploaded and do not block
|
||||
expertise or later stages.
|
||||
|
||||
Errors identify `stage` (`baseClaim`, `damageCase`, or `attachments`) and preserve
|
||||
vendor details. An attachment failure includes:
|
||||
|
||||
Reference in New Issue
Block a user