This indentation seems odd, it also should probably be wrapped in `retry`