Add error handling for API queries

I think this should still set the button to invisible and display a generic error to the user.

Also, while we don't have a style guide I would be inclined to avoid this single line if style, rather placing the return on its own line.