It would be nice to have a msg-id attached to the NOTICE received for “Login authentication failed” and “Improperly formatted auth”. To be able to parse them on the msg-id rather than a long string (that can change?).
On incorrect NICK or PASS apply a tag with for example @msg-id=auth_fail_credentials
current response (even with CAP tags): :tmi.twitch.tv NOTICE * :Login authentication failed
On improperly formatted oauth apply a tag with for example @msg-id=auth_fail_format
current response (even with CAP tags): :tmi.twitch.tv NOTICE * :Improperly formatted auth
I now check for these two edge cases after I have done all the parsing of the message, as the only reference I have now is the actual chat message which I do not really want to rely on to make a proper fail-safe piece of connection, especially if I cannot tell if this message will change or not during the time due to it not being documented.
Also in my current application, I issue a failed authentication event to inform the user to relink and to disable certain UI elements that should not be available if there is no proper authenticated IRC connection.
While I am at it, wouldn’t it a bit easier or cleaner to for devs to have:
A NOTICE on successful authentication with for example @msg-id=auth_success
I now issue a successful authentication event on when I received the command 376 which obvious works but I guess it would be a bit cleaner to have NOTICE with msg-id to use.
A NOTICE on trying to JOIN a non-existing channel with for example @msg-id=msg_channel_not_exists
Because it currently silently drops the JOIN command, I am now using a specific time-out timer to cancel the connect process, to inform the user, and to disconnect as it is one automated workflow.
Seeing that there is already @msg=msg_channel_suspended I wouldn’t know why an unknown channel drops instead of issuing a NOTICE with a tag.
Unless I am missing something obvious to do all of this differently, without relying on the Twitch API.