Navigation

    Windy Community

    • Register
    • Login
    • Search
    • Unread
    • Categories
    • Groups
    • Go to windy.com

    502 Response from Point Forecast API

    Developers
    3
    9
    2492
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • M
      maxmclau-us last edited by

      Sorry if this isn't the correct place for troubleshooting like this, but I'm not sure where else to go at this point. I'm consistently getting a 502 error back for any requests to the Point Forecast API. I've tried to whitelist my IP, I've tried disabling restricted domains for my API key all together, I've played around with the headers and request body, I've tried using a straight curl request as well as Postman. Nothing seems to be working.

      My current setup is a Postman POST request to "https://api.windy.com/api/point-forecast/v2" with the "Content-Type" header set to "application/json" and a payload body set to the exact example request in the documentation: (though I swap out my API key)

      {
      "lat": 49.809,
      "lon": 16.787,
      "model": "gfs",
      "parameters": ["wind", "dewpoint", "rh", "pressure"],
      "levels": ["surface", "800h", "300h"],
      "key": "abcd123"
      }

      It's such a simple REST request, I don't know what could be going wrong. I wish the response was giving me more information, but all I get is a 502 with the message "The server encountered a temporary error and could not complete your request. Please try again in 30 seconds" after a 30 second timeout. Perhaps this is a limitation of my free account? Any help would be greatly appreciated - thanks

      1 Reply Last reply Reply Quote 0
      • marekd
        marekd Administrator last edited by

        @maxmclau-us It seems you are blocked by Google's load balancer probably. What is your country?

        1 Reply Last reply Reply Quote 0
        • M
          maxmclau-us last edited by

          @marekd said in 502 Response from Point Forecast API:

          @maxmclau-us It seems you are blocked by Google's load balancer probably. What is your country?

          Strange, I'm in the US - Colorado. I also tried it on my home network with a different computer, but had the same result.

          1 Reply Last reply Reply Quote 0
          • M
            maxmclau-us last edited by

            Annotation 2020-01-24 172259.png

            Seems pretty straightforward. Anything stick out that I may be missing?

            1 Reply Last reply Reply Quote 0
            • marekd
              marekd Administrator last edited by

              @maxmclau-us Strange... it works for me, even with your key, same request. It seems we have some infrastructure problem. Sorry about that, we will fix it asap.

              1 Reply Last reply Reply Quote 0
              • marekd
                marekd Administrator last edited by

                @maxmclau-us It should be fixed now. Thank you for your report!

                1 Reply Last reply Reply Quote 0
                • E
                  edopardo last edited by

                  Hi, I'm facing out with a similar issue.
                  When I perform a POST request to "https://api.windy.com/api/point-forecast/v2" through POSTMAN
                  with this payload
                  {
                  "lat": 42,
                  "lon": 12,
                  "model": "gfs",
                  "parameters": ["wind", "dewpoint", "rh", "pressure"],
                  "key": "MyApiKey"
                  }
                  I get a correct response as can be seen in the pic below
                  Screenshot from 2020-02-06 15-55-48.png
                  but if i try to perform the same POST request through a JAVA application of mine I get the mentioned HTTP 502 error message
                  Screenshot from 2020-02-06 16-04-32.png

                  Any help would be appreciated, thanks!

                  1 Reply Last reply Reply Quote 0
                  • marekd
                    marekd Administrator last edited by

                    @edopardo I can see in our logs that our backend refused your request because of invalid body... I will release a new API version with some error messages in response. 502 in your case is just unhandled exception from our side...

                    1 Reply Last reply Reply Quote 0
                    • marekd
                      marekd Administrator last edited by

                      New version is out. Error messages should be more helpful now.

                      1 Reply Last reply Reply Quote 0
                      • First post
                        Last post
                      Windyty, S.E. - all rights reserved. Powered by excellent NodeBB
                      NodeBB & contributors, OSM & contributors, HERE maps
                      Terms and Conditions     Privacy Policy