I've just noticed that my API queries are failing in JSON parsing, because of API Site shows offline HTML Page.

I wish it would return a valid JSON response, instead of HTML Page.

  • hmm..... needs a bump? Feb 12 '12 at 23:56
  • 2
    The image/screenshot is gone and not archived anywhere. Please edit in the correct image. Jul 13 '14 at 0:10

While this would indeed be ideal for planned outages, your code and/or libraries & dependencies should be able to handle this elegantly, lest you get bitten by the unplanned outages.

  • shouldn't you just be able to check the response code? May 28 '10 at 6:53
  • 1
    Exactly. That, and set a reasonable timeout for the request. No reason to go crazy on the server side. May 29 '10 at 22:36
  • 3
    @carson - jsonp implementations have a very limited and platform inconsistent ability to respond to non-200 responses, basically making a non-200 response a black hole leaving an ambiguous and artificial timeout the only option. Jul 16 '10 at 8:10

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .