Skip to content
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

V5 ODataError do not expose the Error description as ServiceException in V4 #1785

Closed
idealser opened this issue Mar 29, 2023 · 1 comment
Closed

Comments

@idealser
Copy link
Contributor

Describe the bug
In V4 if you got any exception of ServiceException type, you could clearly identify what's happening from the logs or debug events, because it had a short description of the error (I guess when ToString() was called).
What we have now with V5 is ODataError type which looks like this, when it's raised:

Microsoft.Graph.Models.ODataErrors.ODataError: Exception of type 'Microsoft.Graph.Models.ODataErrors.ODataError' was thrown.

image

I cannot determine from logs what happened during the call, without creating a handler for this error and find the message through the ODataError.Error.Message object.

I suggest that ODataError should show the basic details of the error when it's thrown, so we can analyse information during debug or reading the application logs. Otherwise we need to wrap every Graph call with a try catch to extract the error message or add a middleware.

@andrueastman
Copy link
Member

Clsoing this for now as this is related to #2094 and was resolved
via #2130

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants