When we are searching for tags/authors/concepts/bibtex key,... and there is no result, we can see a result page with simply no results.
When we are searching for users or groups that do not exist, the result is a 404 page. That seems to be counter intuitive, especially because we cannot continue our search, because
we landed on a page that displays no search field. Further we do not know if we searched for something that does not exist or the search is not working.
If so, then in my opinion we should think about the search behaviour in general. IMHO, a general results page, much like the one on GitHub, is preferable to the different kinds of views which we have when searching for different entities.
While the standard fulltext search view is generated by filtering the publications according to some criteria, which leads to a potentially empty list (which is actually normal behaviour: couldn't find any documents with that phrase), the user search view is basically nothing else than the user page. It would be much more preferable in my eyes to really be able to search users, e.g. by finding all users containing "ebrai", instead of looking for the one user called "ebrai". This is no search, this is a check. In my opinion, we should really discuss this, as I'm not at all OK with the current variant.
In the check scenario, a 404 is perfectly right, since we try to access a non-existing URL.
I agree with Thomas. 404 is the right answer as we do not allow to search for users. It is not a search page! A null pointer exception is not the right way but was solved. Why should we allow to search for users?
We have a search field labeled with "user", which looks like as if we'd search for a user, when it's really just a kind of "go to" field. Same with group. However, we also have such a field for author, which, inconsistently, returns a list of documents with the author we search for. If we don't know that author, BibSonomy returns an empty list. (same with tags).