简体   繁体   English

如何使用 Microsoft Api Graph 使用 Java SDK 得到错误

[英]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.

相关问题 使用 Microsoft Graph SDK for Java 时,如何为 Microsoft Teams API 指定许可查询参数? - How do I specify the licensing query parameter for the Microsoft Teams API when using the Microsoft Graph SDK for Java? 使用 Java 检索所有托管设备(使用 Microsoft Graph API SDK) - Retrieve all Managed Devices using Java (with Microsoft Graph API SDK) 尝试使用 Microsoft Graph Java SDK 从共享 Outlook 日历中获取空闲/忙碌插槽时出现错误 401 - Error 401 when trying to get free/busy slots from shared Outlook calendars using Microsoft Graph Java SDK 如何使用 Microsoft Graph API 和 java 为用户获取日历事件 - How to fetch calendar events for a user using Microsoft Graph API with java 如何使用Java和Maven实现Microsoft Graph API - How to Implement Microsoft Graph API using Java and Maven 如何在使用 Microsoft-graph API 时获得国定假日 - How to get national holidays in using Microsoft-graph API 使用Java Microsoft graph SDK在Outlook中添加成员 - add member in Outlook using Java Microsoft graph SDK 使用 Microsoft Graph SDK for java 将带有元数据的大文件上传到 SharePoint - Uploading large file to SharePoint with metadata using Microsoft Graph SDK for java 如何获得微软图形刷新令牌java sdk? - How to get microsoft graph refresh token java sdk? 用于 Java 的 Microsoft Graph SDK - InvalidAuthenticationToken 错误 80049217 - Microsoft Graph SDK for Java - InvalidAuthenticationToken error 80049217
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM