Thoughts on extracting this to a private method, give there's a lot here guarded by that `rescue`?