Using ".catch" instead of the second argument to ".then"
Use consistent indentation