URLConnection.Error "codes" listed anywhere?

I’m seeing only occasional errors URLConnection, however I’d love to get a list of possible exception codes.

For instance, I’ve seen error event #2 appear, with a reason of “Error resolving ‘my domain’: No address associated with hostname”. And event #7 with a reason of “Connection terminated unexpectedly”.

I looked at links listed in the documentation (URL below), but they all point to the standard “404” type messages, not the same values I’m seeing i the URLConnections exceptions.

https://documentation.xojo.com/api/networking/urlconnection.html#urlconnection-error

Any information would be helpful. Thanks!

If you look on URLConnection.Error - Xojo Documentation, I assume you’re using linux, follow the link in Notes called * Linux libsoup status codes to https://developer.gnome.org/libsoup/stable/libsoup-2.4-soup-status.html

Scroll down about half way under Types and Values > enum SoupStatus and you’ll see the ones you’re referring to, they start at 0 and count up so SOUP_STATUS_CANT_RESOLVE is 2 (0,1,2) that you mentioned above and your 7 from above is SOUP_STATUS_IO_ERROR

I hope that helps a little?

1 Like

Hi Julian, thanks. I “felt” like that might be a coincidence that they were in sequence (0,1,etc), but you appear to be right.