Closed mkelley closed 5 years ago
@mommermi I see a few approaches to fix it: request and print the data from the URI, catch the exception and add the URI to the message, or edit astroquery and add the URI to the exception.
@mkelley Good point! How about this as an error message:
RuntimeError: Error raised by astroquery.jplhorizons: Query failed without error message; check URI for more information
The following query was attempted: https://ssd.jpl.nasa.gov/horizons_batch.cgi?batch=1&TABLE_TYPE=OBSERVER&QUANTITIES=%271%2C2%2C3%2C4%2C5%2C6%2C7%2C8%2C9%2C10%2C11%2C12%2C13%2C14%2C15%2C16%2C17%2C18%2C19%2C20%2C21%2C22%2C23%2C24%2C25%2C26%2C27%2C28%2C29%2C30%2C31%2C32%2C33%2C34%2C35%2C36%2C37%2C38%2C39%2C40%2C41%2C42%2C43%27&COMMAND=%222P%3B+CAP%3B%22&SOLAR_ELONG=%220%2C180%22&LHA_CUTOFF=0&CSV_FORMAT=YES&CAL_FORMAT=BOTH&ANG_FORMAT=DEG&APPARENT=AIRLESS&REF_SYSTEM=J2000&CENTER=%27568%27&START_TIME=%222018-10-22%22&STOP_TIME=%222018-10-26%22&STEP_SIZE=%221d%22&SKIP_DAYLT=NO
Looks good.
No object is returned, so a user cannot follow up on the error message without running a debugger.