[BUG] Code: ImageNotFound not present in GraphErrorCode enumerator
Luk164 opened this issue · 3 comments
Please provide the following (and please check them off the list with [x]) before submitting this issue:
- Expected behavior. Please provide links to the specific Microsoft Graph documentation you used to determine the expected behavior.
- Actual behavior. Provide error codes, stack information, and a Fiddler capture of the request and response (please remove personally identifiable information before posting).
- Steps to reproduce the behavior. Include your code, IDE versions, client library versions, and any other information that might be helpful to understand your scenario.
Expected behavior
Microsoft.Graph.GraphErrorCode Contains all graph error codes that may be returned by MS Graph during a request, as stated here: https://learn.microsoft.com/en-us/graph/errors#code-property
Actual behavior
When retrieving user profile image that has not been set, this is the response:
Code: ImageNotFound
Message: Exception of type 'Microsoft.Fast.Profile.Core.Exception.ImageNotFoundException' was thrown.
Inner error:
AdditionalData:
date: 2023-02-28T15:29:10
request-id: 1f1fbf44-42d9-48dc-8ffe-367955f7aed2
client-request-id: 1f1fbf44-42d9-48dc-8ffe-367955f7aed2
ClientRequestId: 1f1fbf44-42d9-48dc-8ffe-367955f7aed2
ImageNotFound is not present in either the documentation list or the enumerator.
Steps to reproduce the behavior
- Setup MS Graph SDK such that it can retrieve profile photos
- Prepare a user without a photo set
- Try to retrieve a photo from said user
Note: I would be glad to create a simple PR for this if it gets determined to be an actual issue.
Thanks for raising this @Luk164
New APIs are added and sometimes these are not captured in the docs.
As suggested would you be willing to submit a PR to https://github.com/microsoftgraph/msgraph-sdk-dotnet/blob/dev/src/Microsoft.Graph/Enums/GraphErrorCode.cs to add the item to the list?
@andrueastman On it.
@andrueastman Done, here is the PR #1707