The type of error you mention are almost always caused by some sort of issue with the appsettings.json file where the servicename/api key/ etc. are set. One good way to debug is to put a breakpoint in the constructor of DocumentSearchClient.cs. on lines 59 and 81. There you can catch potentially catch the error and then dig into the inner exception.
If the debugging doesn't reveal the problem, do raise an issue on the git repo.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…