InternalServerError on GET /places/microsoft.graph.room
Describe the bug
I understand GET /places/microsoft.graph.room isn't meant to be used for a personal account, but it shouldn't throw an InternalServerError in any case. This makes error handling on the client side difficult because we can't tell whether it's because of personal account or an actual issue on Microsoft Graph server.
To Reproduce Steps to reproduce the behavior:
- Make a GET request to
https://graph.microsoft.com/v1.0/places/microsoft.graph.roomwhile signed in as a personal account - Server responds with
InternalServerError
Expected behavior Since this is an issue from the client side, appropriate response would be something like 400 or 404, definitely not 500.
Screenshots

Desktop (please complete the following information):
- OS: MacOS (12.3.1)
- Browser: Chrome
- Version: 103.0.5060.114
Hey @Avada-Kedavra, We surface the errors that come from the API, it's not really an issue from the client side.
Hey @Avada-Kedavra, We surface the errors that come from the API, it's not really an issue from the client side.
Hi @ElinorW! Sorry, let me clarify further. Since this API is not meant to be used by a personal account (as Places.Read.All permission isn't supported for personal account), it is a "bad request" from the client side. The best way to make the client know, in my opinion, would be to respond with an appropriate error.
If the client sees internal server error, it's likely to retry until a 20x or 40x response is received. Does that help?
Hey @Avada-Kedavra, Yes, your clarification definitely helps. It seems that the API returns a 500 in cases where the permissions aren't supported for a personal account. At Graph Explorer we try not to mask the API responses because there could be cases where there is actually a server issue and we report it as a 400 or something which would be wrong.
I will escalate this with the team as it may require further discussion.
@Avada-Kedavra, actually upon further reading... I've learnt that permission errors do result in a 500 response and I believe this is the correct error returned.
@ElinorW We should never return a 5XX intentionally. As @Avada-Kedavra said, this should be a 400 or 404 error.
@darrelmiller okay, just to clarify, Graph Explorer should mask the 500 as a 400 or 404? Or should Graph API update its status codes?
@ElinorW GE should always return the status code returned by Graph so that the developer experience is uniform across any app/tool that they might be using to access Graph
@adhiambovivian , in that case Graph Explorer does return the status code returned by Graph
I shall be closing this as the responses returned are by design