{"record":{"id":"dcd404492f090381","repo":"reacherhq/check-if-email-exists","slug":"missing-reply-to-or-correlation-id","errorCode":null,"errorMessage":"Missing reply_to or correlation_id","messagePattern":"Missing reply_to or correlation_id","errorType":"validation","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"backend/src/worker/single_shot.rs","lineNumber":96,"sourceCode":"\t\t\t.with_content_type(\"application/json\".into());\n\n\t\tlet single_shot_response = SingleShotReply::try_from(worker_output)?;\n\t\tlet reply_payload = serde_json::to_vec(&single_shot_response)?;\n\n\t\tchannel\n\t\t\t.basic_publish(\n\t\t\t\t\"\",\n\t\t\t\treply_to.as_str(),\n\t\t\t\tBasicPublishOptions::default(),\n\t\t\t\t&reply_payload,\n\t\t\t\tproperties,\n\t\t\t)\n\t\t\t.await?\n\t\t\t.await?;\n\n\t\tdebug!(target: LOG_TARGET, reply_to=?reply_to.to_string(), correlation_id=?correlation_id.to_string(), \"Sent reply\")\n\t} else {\n\t\tbail!(\"Missing reply_to or correlation_id\");\n\t}\n\n\tOk(())\n}\n","sourceCodeStart":78,"sourceCodeEnd":101,"githubUrl":"https://github.com/reacherhq/check-if-email-exists/blob/81da93e8a419f601c05e1bcf4a197d25eb0e349d/backend/src/worker/single_shot.rs#L78-L101","documentation":"send_single_shot_reply builds a one-off reply to the backend over RabbitMQ. It requires either a reply_to routing address or a correlation_id to know where the response belongs; when both are absent from the incoming task metadata, it bails with this error instead of publishing an unrouteable reply. It indicates the caller/task payload is missing reply addressing fields.","triggerScenarios":"consume_check_email or do_check_email_work dispatch a single-shot email verification task whose message properties lack both reply_to and correlation_id, so send_single_shot_reply reaches the else branch and executes bail!(\"Missing reply_to or correlation_id\").","commonSituations":"Publishing tasks to the RabbitMQ queue directly without setting reply_to/correlation_id properties; older producers built before reply addressing was added; replaying messages from a dead-letter queue after properties were stripped; misconfigured producer frameworks that drop message headers.","solutions":["Set reply_to (and ideally correlation_id) on the task message when publishing it to the worker queue.","Upgrade/reconfigure the producer so it propagates message properties instead of only the JSON body.","If a task legitimately has no reply target, use a code path that skips the reply rather than send_single_shot_reply.","Check whether the message passed through a dead-letter or forwarding exchange that dropped properties and re-send it."],"exampleFix":"// before: publishing a task without reply properties\nchannel.basic_publish(exchange, queue, body=task_json)\n// after\nchannel.basic_publish(exchange, queue, body=task_json,\n    properties=BasicProperties(reply_to=\"amq.rabbitmq.reply-to\", correlation_id=job_id))","handlingStrategy":"validation","validationCode":"if task.reply_to.is_none() && task.correlation_id.is_none() {\n    return Err(anyhow!(\"task must carry reply_to or correlation_id before dispatch\"));\n}","typeGuard":"fn has_reply_addressing(reply_to: &Option<Uuid>, correlation_id: &Option<Uuid>) -> bool {\n    reply_to.is_some() || correlation_id.is_some()\n}","tryCatchPattern":null,"preventionTips":["Always set reply_to and correlation_id when publishing tasks to the worker queue.","Add a producer-side schema check that rejects messages lacking reply properties.","Be careful with DLQ/forwarding exchanges, which can strip message properties."],"tags":["rabbitmq","missing-field","task-queue"],"backgroundTag":"missing-required-argument","analyzedSha":"81da93e8a419f601c05e1bcf4a197d25eb0e349d","analyzedAt":"2026-09-11T10:06:14.663Z","contentChangedAt":"2026-09-11T10:06:14.663Z","schemaVersion":2},"datasetVersion":"2026-09-15T23:17:13.987Z"}