Added error message for when an invalid API is specified.