./nasa apod date=2050-01-01 replies with 'undefined by undefined' because the the api endpoint responded with
{
"code":400,
"msg":"Date must be between Jun 16, 1995 and Aug 06, 2023.",
"service_version":"v1"
}
Instead of trying to coerce the response into an APODResponseSchema, there should be a mechanism of handling the error response when code is not 200 and giving the user a message that makes sense.
./nasa apod date=2050-01-01
replies with 'undefined by undefined' because the the api endpoint responded withInstead of trying to coerce the response into an APODResponseSchema, there should be a mechanism of handling the error response when code is not 200 and giving the user a message that makes sense.