Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const has = await blockService._repo.blocks.has(cid)
if (!has) {
throw errCode(new Error('block not found'), 'ERR_BLOCK_NOT_FOUND')
}
await blockService.delete(cid)
} catch (err) {
if (!options.force) {
result.error = `cannot remove ${cid}: ${err.message}`
}
}
return result
}),
filter(() => !options.quiet)
)
} finally {
release()
}
}
}