fix(sync): log Mattermost user lookup response body on failure
All checks were successful
Build and Deploy / deploy (push) Successful in 43s
All checks were successful
Build and Deploy / deploy (push) Successful in 43s
Adds response body to the warning log when Mattermost user lookup fails, making it easier to diagnose token/permission issues from logs. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -451,7 +451,9 @@ public class ProvisioningService
|
||||
var userResponse = await client.GetAsync($"/api/v4/users/username/{username}");
|
||||
if (!userResponse.IsSuccessStatusCode)
|
||||
{
|
||||
_logger.LogWarning("Mattermost user lookup failed for {Username}: {Status}", username, userResponse.StatusCode);
|
||||
var lookupBody = await userResponse.Content.ReadAsStringAsync();
|
||||
_logger.LogWarning("Mattermost user lookup failed for {Username}: {Status} {Body}",
|
||||
username, userResponse.StatusCode, lookupBody);
|
||||
return (false, $"User not found ({userResponse.StatusCode})");
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user