Misleading error message when user hits 'projects limit'

Summary

When a user attempts to create a new project and hits the projects limit that is set in their account the resultant error message is Namespace is not valid. This is extremely misleading.

Steps to reproduce

  • Set a user's projects limit to zero.
  • Log in as that user and attempt to create a new project

What is the current bug behavior?

Misleading error message is displayed, Namespace is not valid

What is the expected correct behavior?

The user should see a message indicating the actual reason for the error, something like, This request exceeds the number of allowable personal namespaces for <username>. For bonus points, listing the number of allowable workspaces and the number that currently exist (these could be different) might be useful.

Relevant logs and/or screenshots

Current error message (as of GitLab 12.2):

image

Assignee Loading
Time tracking Loading