microsoftgraph / msgraph-sdk-go

Microsoft Graph SDK for Go
https://docs.microsoft.com/en-us/graph/sdks/sdks-overview
MIT License
245 stars 38 forks source link

Got error by GetWebUrl method of models.ChatMessageable in msgraph-sdk-go/teams #779

Closed hayatoy98 closed 1 month ago

hayatoy98 commented 1 month ago

Describe the bug

I am trying to get the value in webUrl field by using the receiver method GetWebUrl. It seems that panic occurred when m.GetBackingStore().Get("webUrl") does inside GetWebUrl. Even though I checked the response from graph api http endpoint by Postman and it certainly has the value in webUrl field.

Expected behavior

This is the expectation that we can get the value of webUrl field when we use GetWebUrl method.

How to reproduce

Here is the step

  1. sends the message in Teams
  2. In codes, gets models.ChatMessageable using this Chats().ByChatId(sample-channel-id).Messages().ByChatMessageId(sample-message-id).Get(ctx, nil) method.
  3. In codes, tries to get the value by models.ChatMessageable.GetWebUrl() method

SDK Version

v1.47.0

Latest version known to work for scenario above?

No response

Known Workarounds

No response

Debug output

Click to expand log ``` ```

Configuration

No response

Other information

No response

andrueastman commented 1 month ago

Thanks for raising this @hayatoy98

According to the reference below, the code expects the property to be a string. https://github.com/microsoftgraph/msgraph-sdk-go/blob/52a03137ac9d8f44a05888d337876f956e021a06/models/chat_message.go#L977

Out of curiosity, are you able to share the sample response and stack trace as well to help understand the issue better?

microsoft-github-policy-service[bot] commented 1 month ago

This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 4 days. It will be closed if no further activity occurs within 3 days of this comment.