Fixing false marketplace rejections in a Laravel publication queue
Case study · Laravel · Yandex Market · Bookstore CRM
A bookstore CRM reported that the marketplace had rejected several titles during a catalogue update. The offers appeared for sale later, after the CRM had already stopped checking them. A targeted Laravel queue fix lets the job wait for the final card status.
What the operator saw
The marketplace was still processing the update when the CRM journal displayed “Rejected by the marketplace”. To the operator it looked like a moderation failure. Ending the checks early could also leave stock transmission unconfirmed.
How I traced the cause
Catalogue card status
Shows whether the marketplace has finished processing the product details.
Shop offer status
Shows the state of the offer in a particular shop. During a catalogue update, it can be temporary.
The queue job already recognised processing states for new cards. It did not recognise an update in progress on an existing card. The marketplace returned this combination:
| Level | Status | What it meant |
|---|---|---|
| Catalogue card | HAS_CARD_CAN_UPDATE_PROCESSING | The update was still in progress. |
| Shop offer | REJECTED_BY_MARKET | The CRM treated the publication as permanently rejected. |
What changed in the queue
- I added the existing-card update status to the list of states that require another check.
- The record stays
running, and the job checks again in five minutes. Existing waiting limits still apply. - A rejection outside a processing state still goes through the error path. The journal explains whether to wait or inspect the product in the marketplace dashboard.
How I checked the fix
- The regression test feeds the job the same pair of statuses that occurred during the incident.
- It asserts that the CRM record stays
runningand the job is released for another check. - Separate scenarios cover a newly created card still being processed and the message shown when the waiting window expires.
The CRM now keeps checking in this scenario. Publication is still confirmed by the marketplace’s subsequent status.
