Skip to content

502 error when fetching forecast for Luxembourg 15 December 8am #122

Closed

Description

@harristom

Describe the bug

https://api.pirateweather.net/forecast/{key}/49.606302,6.13625,1702627200?units=ca

This returns a 502:

{
    "message": "Bad Gateway",
    "error": "could not JSON decode Lambda function response: statusCode validation failed"
}

Is there a limit of how far ahead you can request a forecast? I couldn't see it in the docs.

Thanks :)

Expected behavior

Get the weather forecast for the requested location and datetime

Actual behavior

502 error

API Endpoint

Production

Location

Luxembourg, Luxembourg

Other details

No response

Troubleshooting steps

  • I have searched this repository and Home Assistant Repository to see if the issue has already been reported.
  • I have read through the API documentation before opening this issue.
  • I have written an informative title.

Activity

  1. alexander0042 commented on Dec 11, 2023

    @alexander0042
    Collaborator

    Thanks for using this service, and apologies for the issue here! What I think is happening is that you're requesting a time in the future (I use this website to keep track of the conversions: https://www.epochconverter.com), and I didn't have any good error handling code for that. Just pushed version 1.5.6 live which adds a bit of correction for this as well as much better error messages.

  2. moved this from Todo to In Progress in PirateWeather APIon Dec 11, 2023
  3. cloneofghosts commented on Dec 11, 2023

    @cloneofghosts
    Collaborator

    @alexander0042 I double checked the API documentation and there is nothing there which states that requesting a date in the future causes an error. Might be a good idea to add something to the docs which says that requesting dates in the future will not work.

  4. alexander0042 commented on Dec 11, 2023

    @alexander0042
    Collaborator

    On top of this (for once). Done in commit 9243213

  5. moved this from In Progress to Done in PirateWeather APIon Dec 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingdocumentationImprovements or additions to documentation

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions