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

[MM-57702] Add RequestIDs+TS in msgraph client errors #625

Merged
merged 1 commit into from
May 15, 2024
Merged

Conversation

JulienTant
Copy link
Member

@JulienTant JulienTant commented Apr 25, 2024

Summary

Add RequestIDs (client request id + response request id) and timestamp in our logs as recommended by MS

I tried it by creating a broken command:

func (p *Plugin) executeErrAPI(args *model.CommandArgs) (*model.CommandResponse, *model.AppError) {
	user, err := p.GetClientForApp().GetUser("invalid")
	if err != nil {
		p.GetAPI().LogWarn("Error in getting user", "error", err.Error())
		return p.cmdError(args, "Error in getting user")
	}
	return p.cmdSuccess(args, fmt.Sprintf("User: %v", user))
}

Ticket Link

https://mattermost.atlassian.net/browse/MM-57702

@JulienTant JulienTant added 2: Dev Review Requires review by a core committer QA/Review Not Required labels Apr 25, 2024
Copy link
Member

@lieut-data lieut-data left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

YES!

@JulienTant
Copy link
Member Author

@jespino gentle ping!

@JulienTant JulienTant merged commit f7ffaf2 into main May 15, 2024
7 checks passed
@JulienTant JulienTant deleted the MM-57702 branch May 15, 2024 14:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2: Dev Review Requires review by a core committer QA/Review Not Required
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants