microsoftgraph / microsoftgraph/msgraph-sdk-java
com.microsoft.graph.models.odataerrors.ODataError exception when trying to create Subscription
Chưa có ai nhận issue này.
- Ngôn ngữ chính
- Java
- Star
- 444
- Fork
- 154
- Merge trung bình
- 18 giờ 28 phút
- Pull request đã merge (30 ngày)
- 4
Mô tả
Describe the bug
In our java springboot app we use the following dependency: https://mvnrepository.com/artifact/com.microsoft.graph/microsoft-graph/5.72.0 (also checked on https://mvnrepository.com/artifact/com.microsoft.graph/microsoft-graph/6.42.1)
When we try to create eventhub subscription for meeting room via that API we are getting error:
com.microsoft.graph.http.GraphServiceException: Error code: ExtensionError\nError message: Operation: Create; Exception: [Status Code: BadRequest; Reason: The value 'https://outlook.office365.com/api/v2.0/Users('Room_Sandbox%40company.com')/Events'of parameter 'Resource' is invalid.]\n\nPOST[https://graph.microsoft.com/v1.0/subscriptions\nSdkVersion] : graph-java/v5.72.0\nSdkVersion : graph-java/v5.72.0\n[...]\n\n400 : \n[...]\n\n[Some information was truncated for brevity, enable debug logging for more details]
Room_Sandbox%40company.com - I changed this here intentionally, in the original response there is a different email.
But the error is only for particular emails, not for all. Other emails work fine.
We've tried to update to the newest dependencies related to this api but till getting the same error.
Stack trace:
com.microsoft.graph.models.odataerrors.ODataError: Operation: Create; Exception: [Status Code: BadRequest; Reason: The value 'https://outlook.office365.com/api/v2.0/Users('Room_Sandbox%40company.com')/Events' of parameter 'Resource' is invalid.] at com.microsoft.graph.models.odataerrors.ODataError.createFromDiscriminatorValue(ODataError.java:36) at com.microsoft.kiota.serialization.JsonParseNode.getObjectValue(JsonParseNode.java:212) at com.microsoft.kiota.http.OkHttpRequestAdapter.lambda$throwIfFailedResponse$0(OkHttpRequestAdapter.java:704) at com.microsoft.kiota.ApiExceptionBuilder.<init>(ApiExceptionBuilder.java:26) at com.microsoft.kiota.http.OkHttpRequestAdapter.throwIfFailedResponse(OkHttpRequestAdapter.java:703) at com.microsoft.kiota.http.OkHttpRequestAdapter.send(OkHttpRequestAdapter.java:307) at com.microsoft.graph.subscriptions.SubscriptionsRequestBuilder.post(SubscriptionsRequestBuilder.java:100) at com.microsoft.graph.subscriptions.SubscriptionsRequestBuilder.post(SubscriptionsRequestBuilder.java:84)
Expected behavior
The subscription should be created without errors.
How to reproduce
Try to create subscription for meeting room
SDK Version
6.42.1
Latest version known to work for scenario above?
No response
Known Workarounds
No response
Debug output
Click to expand log
```</details>
### Configuration
_No response_
### Other information
_No response_
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Hướng nghiên cứu
Bắt đầu bằng cách tái hiện việc tạo subscription cho phòng họp với SDK 6.42.1 và so sánh một email bị ảnh hưởng với một email hoạt động. Kiểm tra SubscriptionsRequestBuilder.post và phản hồi GraphServiceException/ODataError được báo cáo; hoàn thành khi subscription của phòng bị ảnh hưởng được tạo mà không có lỗi Resource không hợp lệ.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- java, spring-boot
- Lĩnh vực
- api
- Loại issue
- Lỗi
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Cần làm rõ
- Mức phù hợp với người mới
- 25/100