These forums have been archived and are now read-only.

The new forums are live and can be found at https://forums.eveonline.com/

EVE Technology Lab

 
  • Topic is locked indefinitely.
 

Error pages on api.eve-online.com

Author
Artctura
Perkone
Caldari State
#1 - 2013-04-09 13:52:03 UTC
Is there any reason that they can't be recreated in XML? Everything accessing that site is expecting to access XML, and 404 or 500 errors appear as HTML documents instead of XML.

Doing so would allow traditional XML error trapping to work, while today, especially for 500 errors, we need to trap the existence of the html tag prior to xml parsing of the code (or trap the xml parser itself barfing).
Tonto Auri
Vhero' Multipurpose Corp
#2 - 2013-04-09 19:42:00 UTC
Everything accessing that site is expected to use HTTP(S).
Make your conclusion from this point of view.

Two most common elements in the universe are hydrogen and stupidity. -- Harlan Ellison

Ydnari
Estrale Frontiers
#3 - 2013-04-09 19:58:50 UTC
Tonto Auri wrote:
Everything accessing that site is expected to use HTTP(S).
Make your conclusion from this point of view.

Did you accidentally reply to some other post? Because that's got nothing to do with it.

--

Artctura
Perkone
Caldari State
#4 - 2013-04-09 20:45:04 UTC
Tonto Auri wrote:
Everything accessing that site is expected to use HTTP(S).
Make your conclusion from this point of view.


Yes, I'm completely baffled. The site serves XML documents over HTTPS. Everything the site generates is an XML document. The problem is, the error pages it generates are not XML, but HTML, so you either need to trap response codes (Particularly 500) or trap the return data for html tags.

If they returned XML error pages, you'd have something your parser could already trap natively without breaking.
Shellac Brookdale
Cutting Edge Incorporated
RAZOR Alliance
#5 - 2013-04-09 22:11:51 UTC
Its always possible that the backend isn't available and the proxy/caching layer in front of it needs to return a http response to your request. So you need to handle http response codes for those cases as I doubt that CCP will modify the whole networking stack in a way to exclusively server its own xml format instead of http.
Artctura
Perkone
Caldari State
#6 - 2013-04-10 02:57:19 UTC
Shellac Brookdale wrote:
Its always possible that the backend isn't available and the proxy/caching layer in front of it needs to return a http response to your request. So you need to handle http response codes for those cases as I doubt that CCP will modify the whole networking stack in a way to exclusively server its own xml format instead of http.



You *should* be able to adjust the intermediate servers to handle specific error documents for the backend.

Though to be fair, I've seen pages return 80% healthy xml and then throw an html based 500 error....

In any case, it would be nice to here from CCP if this is possible and make our lives a little easier.
Mitome Cobon-Han
Astral Academy
Astral Alliance
#7 - 2013-04-10 08:00:06 UTC  |  Edited by: Mitome Cobon-Han
Sorry folks you are getting on the wrong track here. Tonto Auri is right, but not very helpful.

"HTTP 404" or "HTTP 500" are in fact HTTP server status codes. This is not a document or data you requested.
Its an error message from the server, that the data is not available.

Your application should under no circumstances try to make any sense of attached data or documents, if the server at the same time is telling you that the request failed.

There my be attached HTML, but this is entirely optional by HTTP standards, some do it for users convenience sitting in front of browsers, but it has no value to your application.

If you rely on it you are not HTTP compatible anymore.

Your application should check the server sent HTTP status codes. before anything else.

If its something in the range of 4xx or 5xx don't bother with the data, it failed anyway.

If its in range of 3xx, act accordingly (follow redirect, use cached copy).

Only If its 200 OK, read and parse the data.

http://en.wikipedia.org/wiki/List_of_HTTP_status_codes

Hope this helps.
Tonto Auri
Vhero' Multipurpose Corp
#8 - 2013-04-10 11:02:08 UTC  |  Edited by: Tonto Auri
Mitome, I think, you were looking for http://tools.ietf.org/html/rfc2616#section-10
Which is, in fact, a normative document.
While wiki is informative... at best.

Especially, in order:
http://tools.ietf.org/html/rfc2616#section-10.4
http://tools.ietf.org/html/rfc2616#section-10.4.5
http://tools.ietf.org/html/rfc2616#section-10.5
http://tools.ietf.org/html/rfc2616#section-10.5.1

and http://tools.ietf.org/html/bcp14, separately.

Two most common elements in the universe are hydrogen and stupidity. -- Harlan Ellison

Cyerus
Eternal Strife
#9 - 2013-04-10 13:48:02 UTC  |  Edited by: Cyerus
As a sidenote;

If you are using Pheal or PhealNG, you should receive an PhealConnectionException with either the cURL or HTTP errorcode returned.

Also, please don't complain to CCP if your own error reporting code is worthless.
Yes, their servers should be more stable.
No, they aren't to blame if you don't code in any error checking.