throw exception when app key or secret key are invalid, update tests to
get to 100% coverage