Log project_id and project_path if present in authentication failures
In gitlab-org/gitlab-vscode-extension#758 (closed),
I noticed recently that many of my code suggestions were failing with
Forbidden by auth provider
error messages. This appears to happen
when the VSCode extension doesn't have an association between the
GitLab project and the repository. As a result, project_id
was -1, and
project_path
was blank.
The Model Gateway doesn't actually care about those values, but it seems that the VSCode extension may be attempting to use Code Suggestions even though the project wasn't associated.
That made me wonder if that's the most common authentication failure
mode here. This commit logs the values as meta.project_id
and
meta.project_path
when an authentication error occurs to see if this
is a common problem.