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.
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