Skip to main content

Error handling

Wrap your deleteRecords() call in a try/catch block to gracefully handle failures. This is especially important when using options.transactional: true, as any failure will trigger a rollback.

TypeScript
try {
const result = await manta.deleteRecords({
table: "critical_data",
where: { id: 1 },
options: { transactional: true },
});
} catch (error) {
// Gracefully handle internal table errors
console.error("Manta deletion failed:", error.message);
}