“Login failed for user” may mean “database name is invalid”

One of my colleagues tried to work with a new database from DevServer and got an error “Login failed for user”.
We checked everything related to security and permissions, but it didn’t help.
After a while we recognize that there was spelling mistake in the name of the database in connection string.
In this case  Login failed for user” error actually meant  “database name is invalid”
Why it wasn’t shown as a reason in plain English?
Other possible reason for the errors are described in multiple articles, including following: