Handle no documents to export (#10588)

* Handle no documents to export

Signed-off-by: Artem Savchenko <armisav@gmail.com>

* Fix formatting

Signed-off-by: Artem Savchenko <armisav@gmail.com>

---------

Signed-off-by: Artem Savchenko <armisav@gmail.com>
This commit is contained in:
Artyom Savchenko
2026-03-05 15:19:29 +07:00
committed by GitHub
parent cdec274c14
commit b7b5f5cbe0
15 changed files with 39 additions and 2 deletions
+5 -1
View File
@@ -539,7 +539,11 @@ export function createServer (
const exportResult: ExportResult = await exporter.export(options)
if (exportResult.success && exportResult.exportedCount > 0) {
if (exportResult.exportedCount === 0) {
res.status(400).send({ message: 'No documents found to export' })
}
if (exportResult.success) {
await sendExportCompletionNotification(
measureCtx,
targetTxOps,