Thanks for your bug report. I have not been able to reproduce this issue here. Can you provide a step by step method that reproduces this that I can test out in a clean install of mIRC?

As Wims mentioned, the way /nickserv was designed means that it reports success or failure using language, as opposed to an identifiable numeric or named event. This means that /nickserv on different IRC networks can use different combinations of words, and even a different language, to report success or failure. So there is no reliable/consistent way for an IRC client to test for this.

In your case, you have said that you are seeing numeric 402. Is this specifically related to nickserv? The only explanation I can get for this numeric is "No such server" and "Used to indicate the server name given currently doesn't exist". Can you post the raw numeric 402 you are seeing?