utilize try-with-resources to properly clean up after failed requests