Skip to content

Commit

Permalink
Improve error message on export task failure.
Browse files Browse the repository at this point in the history
  • Loading branch information
yannbolliger committed Mar 5, 2023
1 parent 6a86147 commit 0bde868
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/NotionExporter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,10 @@ export class NotionExporter {
if (task.state === "success" && task.status.exportURL)
resolve(task.status.exportURL)
else if (task.state === "in_progress") setTimeout(poll, pollInterval)
else reject("Export task failed.")
else {
console.error(taskId, task)
reject(`Export task failed: ${taskId}.`)
}
}
setTimeout(poll, pollInterval)
})
Expand Down

0 comments on commit 0bde868

Please sign in to comment.