ergochat / ergo

A modern IRC server (daemon/ircd) written in Go.
https://ergo.chat/
MIT License
2.27k stars 180 forks source link

irc/utils: ErrInvalidUUID improve error message #2052

Closed alrs closed 1 year ago

alrs commented 1 year ago

The err variable on line 31 was being semi-dropped in the case that the call to Decode() returned both an error and a length of 16.

I refactored ErrInvalidUUID a little bit so that an operator will see an error message that includes the invalid UUID causing the problem. I added TestErrInvalidUUID() to verify that it is returning the format that I expected.

slingamn commented 1 year ago

Replaced by #2054, thanks for the report