Improve GitLab Duo chat error when running slash commands on personal namespace

Background

An M3003 error is returned when running GitLab Duo chat slash commands within a personal namespace from the VSCode extension.

Steps to reproduce

  • Open VSCode, install GitLab Workflow extension, and initialise it with a valid PAT. Ensure your user account has GitLab Duo access enabled.
  • Open a repo which is NOT under gitlab-org or a namespace with Duo features enabled.
  • Notice that Code Suggestions, Code Completion etc all work in the editor
  • Notice that regular Duo chat works
  • Run any slash command, e.g. /refactor, /fix
  • Notice you get an M3003 error back

Expected behaviour

Duo Chat slash commands work, since all other Duo features work.

Or, if this is an intentional restriction, a better error is returned. The error above did not help me understand the actual problem I had when I hit this scenario.

For example, M3002 seems more specific (Duo features turned off in this namespace)

I am sorry, I cannot access the information you are asking about. A group or project owner has turned off Duo features in this group or project. Error code: M3002

Or, if this should be an M3003, perhaps we could improve the message. And/or improve the troubleshooting docs to mention this scenario.

Actual behaviour

Slash commands do not work. Error message does not mention problems related to the namespace I am working in:

I'm sorry, I can't generate a response. You might want to try again. You could also be getting this error because the items you're asking about either don't exist, you don't have access to them, or your session has expired. Error code: M3003

Edited by Elwyn Benson