[英]How to get error using the Microsoft Api Graph using the Java SDK
In the microsoft documentation you can see the following example:在 microsoft 文档中,您可以看到以下示例:
graphClient.teams(teamId)
.buildRequest()
.patch(team);
but what happens if the operation is not performed correctly and I want to query the error returned, is there any way to know if the operation failed and get the cause of the error?但是如果操作没有正确执行并且我想查询返回的错误会发生什么,有没有办法知道操作是否失败并得到错误的原因?
I'm not familiar with Java but for .NET you can send HTTP request and read a response status code.我不熟悉 Java 但对于 .NET 您可以发送 HTTP 请求并读取响应状态代码。
There should be similar way for JAVA. JAVA应该有类似的方法。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.