In C/C++ land, errors are often mapped to
const size_t int values. Whether it's an enum or just a list of "codes". In this case, I suspect (like OpenGL) it's just a giant list of codes defined as "extern const uint32_t MY_SUPER_ERROR = 0x0001" and some other part of the code has defined the same value to another error type. Then it's trying to value match and give a human readable value (0x001) but based on the matched value (0x0001 becomes 0x1000) because MY_SUPER_ERROR is 0x1000 in some other part of the code. This happens when people in C/C++ land follow this logic:
Lib Guy 1: "I need an error.h to store all my errors to make it easy for me"
Lib Gal 2: "I need an error.h to store all of my error values so I can just use type names like a boss"
Exe Guru 1: "Which is this?"
The other option is that an error was thrown inside error handling code which threw an error and was unhandled, throwing an error generically at the base.