I'm using the the graph api in an internal .Net Core 3.1 webapi. However, each time a failed response is returned, it returns as a 500 internal error with the response as content-type: text/plain.
Status Code: NotFound
Microsoft.Graph.ServiceException: Code: Request_ResourceNotFound
Message: Resource '********' does not exist or one of its queried reference-property objects are not present.
Inner error:
AdditionalData:
date: 2020-10-13T13:44:21
request-id: 8053255b-2f1c-4543-8de7-*******
client-request-id: 8053255b-2f1c-4543-8de7-*******
ClientRequestId: 8053255b-2f1c-4543-8de7-*******
I am looking for the response to be return in JSON format similarly to the MS Graph Api explorer with the appropriate error code instead of a 500 Internal Error.