Closed Ruhrpottpatriot closed 8 years ago
While I agree that error pages should be consistent with something, I'm not sure if it should return JSON. I haven't seen any JSON message at all so far on this domain. The entire domain render.guildwars2.com is used for providing images that are linked from certain items, etc. from api.guildwars2.com.
Also, never request pages without checking the response header for the HTTP status code. Even the api.guildwars2.com domain can spit out HTML pages that they can't fix due to how IIS works. You get a 404 response (or any other error) that you can always catch this way.
It's not a Cloudfront error, fwiw. Cloudfront uses our servers as origins for the CDN and is correctly passing back the RenderSrv 404 page.
RenderSrv is returning a 404 status code, which is correct.
render.guildwars2.com
usually only outputs raw images, so I disagree on an expectation of the 404 message being JSON. That page is the standard 404 response from our server stack and overriding that behavior in this one case would be technical debt of debatable value.
If you try to access the wrong URL on the render endpoint you'll receive a crypric error page in HTML, instead of the usual JSON error message. Parsing this case introduces needless conditional statements and thus introduces complexity to the application.
Steps to reproduce:
https://render.guildwars2.com/colors
will return a 404 not found with the following message body:Judging from the X-Cache and the Via header (which return "Error from cloudfront" and 1.1 2db316290386960b489a2a16c0a63643.cloudfront.net (CloudFront) respectively), this seems to be a redirection error from CloudFront.
From my testing this seems to happen with every invalid render url and should be fixed.