-
Notifications
You must be signed in to change notification settings - Fork 252
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Using startswith filter on CalendarView query throws 500 error if any events have no subject #2559
Comments
If the subject is not specified when an event is created, the value is null. In that case, you can modify the $filter clause and ignore events without the subject.
As you mentioned that it's a known issue. Have you already reported it? |
@MartinM85 The known issue comment was intended for our internal developers, not meant to imply it's an official known issue within Microsoft. We did have a Microsoft support ticket open for 2+ months related to this issue though. Thanks for pointing out that the null filter works as a work around too. I still don't believe reporting a 500 error is the intended result when using the startsWith filter without an additional null filter? |
@tsulli Thanks for raising this. As this issue is regards the behavior of the API, and this repo is mainly intended for SDK related issues, you can possibly re-open the support ticket for this to be followed up by the API team or provide feedback at https://aka.ms/graphFeedback. |
@andrueastman I let all of the support folks on the ticket know about this Github issue. I've been assured it's been seen and passed on to the product team, and they will continue working on it. I've closed out the ticket since we have a work around for now. |
Thanks for confirming. We'll also close this issue for now as there is no action to be done on the SDK side. |
Describe the bug
When querying CalendarView for user calendar events with a subject filter, Graph returns an internal server error 500 if the user has any events within the specified time frame that have no subject. This error occurs both in the SDK and in Graph Explorer.
If the Graph query filter is removed and the events are filtered with LINQ on the client site, no error is thrown.
Expected behavior
A CalendarView query with a startswith filter on the subject should return a 200 response with only events that have a subject that starts with the specified string. Events with no subject should be omitted.
How to reproduce
For example, if your subject-less event is on June 24 at 10am EDT:
Repsonse:
The equivalent SDK code:
reqConfig.QueryParameters.Filter = $"startswith(subject, '[Bug]')";
line from the SDK query) and receive a 200 response:SDK Version
5.56.0
Latest version known to work for scenario above?
No response
Known Workarounds
Removing the startswith filter from the query to return all events from Graph, then filter on the client side. For example with LINQ:
Debug output
Click to expand log
```The text was updated successfully, but these errors were encountered: