HTML Tag inside the JSON response

  • 8
  • Problem
  • Updated 1 year ago
  • (Edited)
I requested weather history for a station through API.
Sometimes I receive response with HTTP with Status Code 200 but there is some HTML tag in response body.
Requested URL: http://api.wunderground.com/api/key/history_20160805/q/KDAL.json Resonse Body: { "response": { "version":"0.1", "termsofService":"http://www.wunderground.com/weather/api/d/terms.html", "features": { "history": 1 } } ,<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"> <html><head> <title>400 Bad Request</title> </head><body> <h1>Bad Request</h1> <p>Your browser sent a request that this server could not understand.<br /> </p> <p>Additionally, a 400 Bad Request error was encountered while trying to use an ErrorDocument to handle the request.</p> </body></html> }
Photo of Chanh Ha

Chanh Ha

  • 2 Posts
  • 0 Reply Likes

Posted 1 year ago

  • 8
Photo of James Anding

James Anding

  • 60 Posts
  • 49 Reply Likes
Sorry I have no answer for your issue, but I did run that query many times for a test and it always returned a good response for me. WU tech support will probably have to see what is happening for you. Maybe your browser or internet connection sometimes garbles part of the http request. Just a guess.

Note:
You might not want to include your API Key in any messages or questions as you did in the original example. 
Photo of Chanh Ha

Chanh Ha

  • 2 Posts
  • 0 Reply Likes
Thank you for your note.
Photo of Brendan Hayes

Brendan Hayes, Official Rep

  • 962 Posts
  • 122 Reply Likes
We will look into it.  Looks like the standard website error + API error at the same time. 
Photo of dengaterade

dengaterade

  • 2 Posts
  • 2 Reply Likes
Brendan Hayes, is history data no longer available? It seems there are a number of folks here all having the exact same issue in the last few days.

On the "key settings" page under available plans, there's a link for a "History Add-On." It still seems to suggest that history data should be available for fewer than 500 hits per day:
  • Or if your use of the API falls under 500 hits per day and you are still complying with the Terms of Service, you do not need to ask permission.
  • Unless you want to purchase weather data above and beyond the daily limits or History data, do not use this form
Photo of Brendan Hayes

Brendan Hayes, Official Rep

  • 962 Posts
  • 122 Reply Likes
We will look into it.  Looks like the standard website error + API error at the same time. 
Photo of Faisal Islam

Faisal Islam

  • 3 Posts
  • 2 Reply Likes
Any updates you may have would be greatly appreciated!
Photo of Michael Vabalaitis

Michael Vabalaitis

  • 3 Posts
  • 0 Reply Likes
Thank you for your support! Look forward to the updates
Photo of Graham Daley

Graham Daley

  • 1 Post
  • 0 Reply Likes
I am also seeing this issue, only for history requests. Requests for current conditions are fine.
Photo of Iliya Totsev

Iliya Totsev

  • 1 Post
  • 0 Reply Likes
I'm having the same issue.
Photo of Fracai

Fracai

  • 3 Posts
  • 0 Reply Likes
Photo of Norbert Barbír

Norbert Barbír

  • 3 Posts
  • 1 Reply Like
I'm having the same issue as well. 
Photo of Faisal Islam

Faisal Islam

  • 3 Posts
  • 2 Reply Likes
Same issue as well!
Photo of Michael Vabalaitis

Michael Vabalaitis

  • 3 Posts
  • 0 Reply Likes
Same issue... Was this functionality taken away?
Photo of michielbon

michielbon

  • 2 Posts
  • 1 Reply Like
Same issue! I would be happy if it works again!.
Photo of Federico Ibba

Federico Ibba

  • 1 Post
  • 0 Reply Likes
I got the same issue making this history call:
http://api.wunderground.com/api/key/history_20150627/q/44.6252448,12.25806849.json

I can add that, when the history doesn't match the coordinates that I give to WU, it just returns me an empty response but without fails.

If I make it through Postman, it returns me "Bad string", while if I make it using apiGee it returns me this:

HTTP/1.1 200 OK
{
  "response": {
      "version":"0.1",
      "termsofService":"http://www.wunderground.com/weather/api/d/terms.html",
      "features": {
          "history": 1
      }
  }, 
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>400 Bad Request</title>
</head><body>
<h1>Bad Request</h1>
<p>Your browser sent a request that this server could not understand.<br />
</p>
<p>Additionally, a 400 Bad Request
error was encountered while trying to use an ErrorDocument to handle the request.</p>
</body></html>&nbsp; }


(Edited)
Photo of dah

dah

  • 5 Posts
  • 3 Reply Likes
I am also facing same issue.  A few days ago, the calls would fail sometimes and then work again later (for the same station/date).  Now they are all failing for history requests.
Photo of docty

docty

  • 1 Post
  • 0 Reply Likes
I am seeing the same behaviour. Calls to history are consistently failing now.
(Edited)
Photo of Tammi

Tammi

  • 2 Posts
  • 0 Reply Likes
Same issue here too.  Can we have an update?
Photo of Brendan Hayes

Brendan Hayes, Official Rep

  • 962 Posts
  • 122 Reply Likes
We are tacking down the issue.  We are also dealing with high load from the storms and working to be stable and also deal with this bug. 
Photo of Brendan Hayes

Brendan Hayes, Official Rep

  • 962 Posts
  • 122 Reply Likes
We are tacking down the issue.  We are also dealing with high load from the storms and working to be stable and also deal with this bug. 
Photo of Brendan Hayes

Brendan Hayes, Official Rep

  • 962 Posts
  • 122 Reply Likes
This is fixed now and shouldn't give the HTML error anymore.
Photo of Brendan Hayes

Brendan Hayes, Official Rep

  • 962 Posts
  • 122 Reply Likes
This is fixed now and shouldn't give the HTML error anymore.
Photo of Brendan Hayes

Brendan Hayes, Official Rep

  • 962 Posts
  • 122 Reply Likes
Rolled back, trying again...
Photo of Paul Szydlowski

Paul Szydlowski

  • 3 Posts
  • 0 Reply Likes
Looks like the history call is broken again.
Photo of Brendan Hayes

Brendan Hayes, Official Rep

  • 962 Posts
  • 122 Reply Likes
Yeah, looking into it again
Photo of Paul Szydlowski

Paul Szydlowski

  • 3 Posts
  • 0 Reply Likes
Looks like it's working - thank you! I had a feeling the storms had you all pretty busy, so double thanks.
Photo of dengaterade

dengaterade

  • 2 Posts
  • 2 Reply Likes
I see it working again, too. Thanks, Brendan!
Photo of dah

dah

  • 5 Posts
  • 3 Reply Likes
Thanks Brendan - in good shape now

UPDATE - things worked fine for a few hours and now I am getting the same errors again.
(Edited)
Photo of Steven Darwin

Steven Darwin

  • 2 Posts
  • 0 Reply Likes
Yes, the errors have returned.
Photo of Faisal Islam

Faisal Islam

  • 3 Posts
  • 2 Reply Likes


It seems the issue is not resolved yet.
Photo of Norbert Barbír

Norbert Barbír

  • 3 Posts
  • 1 Reply Like
As I see the history service is currently unstable. 2 of 10 requests get a valid response, others are still running into "400 Bad  Request " error.
Photo of Daniel Hitchcock

Daniel Hitchcock

  • 2 Posts
  • 0 Reply Likes
Same here - 400 Bad Request