#207 updated API credentials validation and improved error handling