Turn HTTPService error codes into something meanful

Right now, when we get an error from HttpService, we end up getting an error code. The problem is, this error code doesn’t actually mean anything:

See? ‘err=0x2EE2’ - What on earth does this mean?

Luckily enough for me I searched ‘WinHTTP error messages’ and got [b]this[/b] which told me the error codes in decimal. So the easy task was turning the hex into decimal and then printing it.

So I’m getting a request time out! Aha! I know how to debug my code now!

Now, imagine if I didn’t have to do all of those intermediate steps and it just told me ‘WinHttpSendRequest failed, ERROR_WINHTTP_TIMEOUT’

I would probably be able to guesstimate what it meant just from that, and then be able to fix my code without having to figure out where the error messages are stored.

That’s why I would love it if HTTPService errors were changed so that it doesn’t give an obscure error code.

The issue is that the error is probably propagated from a lower level system, not by any part of the ROBLOX engine, so the engine is dependent on the error reporting of that lower level system. They could implement something like strerror for it that links every possible code to a meaningful message, but it’s a bit weird to do that for someone else’s application. And like you said, you can google everything anyway.

If descriptive error messages can’t be provided maybe someone could create a page on the roblox wiki for the winhttp errors with a table of hex error codes and the corresponding message from microsoft, or at least the ones your most likely to encounter.