mikelax / spacebot

spacebot - A Slack Bot for exploring NASA images
https://slashspacebot.netlify.app
Apache License 2.0
6 stars 2 forks source link

APOD - always return image if random parameter is supplied #18

Open mikelax opened 8 years ago

mikelax commented 8 years ago

As a user, if I supply the random parameter to the apod command, I expect a valid response to be returned. We need to handle the use case where the user requests random and it just so happens that an invalid date is selected.

In this case the command should be run again with a new random date until a valid response is returned.

example: apod random - generates date of: 1997-09-06 NASA API returns 500 for given date. https://api.nasa.gov/planetary/apod?api_key=DEMO_KEY&date=1997-09-06