Show error message and return if api_key is missing

@neerajdotname Pulled miry's changes in, so just adding error messages if api key is blank