ID:117064
 
Applies to:
Status: Open

Issue hasn't been assigned a status value.
Currently, if world.Export() fails to retrieve anything or doesn't connect in the following format:
mob/verb/test()
var/http[] = world.Export("http://www.byond.com")

if(!http)
usr << "Failed to connect."
return


Then, the only way to actually retrieve the specific error code would be to set your ".configure debug" to on. Then, you'll get errors like this:
BUG: Http error: HTTP server returned unexpected status: 502 Bad Gateway

if it fails to connect. It'll tell you error code, and the description of what went wrong. This happens for 404, 504, 502, etc. I think there should be some way for world.Export() to access the error in your programming so you can make your program know what course of action to take in case of each error.
I know this is almost two years old, but it's kind of important to me. The program clearly knows the errors, as they're output into the Options and Messages window.

There could be an "error" in the associated list returned by world.Export() which would contain the error message, rather than the list being null...though, that might back backwards compatibility. Hm. Any ideas?
+1 sounds like a good idea, since a lot more developers are using offsite solutions.