HF RL Explorer

fix: check return codes in gravity build tree and database recovery()

fix: check return codes in gravity build tree and database recovery(): a task in github-trending-environments-10k (Harbor dataset). Title: fix: check return codes in gravity build tree and database recovery()

The task

**Title:** fix: check return codes in gravity_build_tree and database_recovery()

Part of scalingX/github-trending-environments-10k.