Fix gravatarLookup method

Closes #4511
- Add missing "return"
- Fix error handling