FIREFLY-1695: Display error message when upload table can't be read#1756
FIREFLY-1695: Display error message when upload table can't be read#1756jaladh-singhal merged 1 commit intodevfrom
Conversation
loitly
left a comment
There was a problem hiding this comment.
It’s working as described. However, if possible, it would be better to display the user’s original input instead of the server-side filename/path, which is meaningless to the user.
A related issue, possibly outside the scope of this PR, is with the IRSA Catalog’s Multi-Object search. If a bad file is uploaded, the search still runs but ends up stuck in a loading state.
(IRSA Catalog → Search Method = Multi-Object)
@loitly yes I had the same thought and also found the relevant code, but wasn't sure what to replace firefly/src/firefly/java/edu/caltech/ipac/table/io/VoTableReader.java Lines 241 to 242 in 66314c8 OR is there a better way to extract only relevant information from server-side error responses at client-side? |
Good catch, I didn't notice it. I just looked it up, this (and all ife apps) are using an old |
the migration is not done. The image panel needs to be migrated as well. |
I would change server-side code to only return the error message and allow the caller(client) to add context if needed. So, in your case, the message would look like.... Error in File Retrieve: Unable to parse firefly_1695_bad_table.vot as a VOTABLE. You can add 'location' to the error log line above for debugging purposes. LOG.error(e, "unable to parse " + location ");
throw new DataAccessException(e.getMessage(), e); |
Yes, I can work on this in a new ticket if we want to use |
@loitly thanks, I logged the location and I'm only returning exception's message from server-side. The error on client-side looks much cleaner now. Rebuilt the build |
FIREFLY-1695: use determineValidity in UploadTableChooser to show error Fallback to a generic error popup instead of just returning without any feedback FIREFLY-1695: Use error response returned by server in determineValidity FIREFLY-1695: Make server-side file analysis return only the error message & log the rest
f3ccf76 to
d46dc11
Compare
Fixes FIREFLY-1695
determineValiditylike FileUploadPanel's onSubmit, that shows an error popup if invalidmessagestate besidesreportbut wasn't using it in generating invalidation popup, now made it do so by registering inrequest.additionalParamsand passing it todetermineValidity.messagestate to readFileAnalysis.ErrorResponsedescription from server-side for showing more specific error messages.Testing
https://fireflydev.ipac.caltech.edu/firefly-1695-upload-error-msg/firefly/
Go to "Upload" tab -> Upload the bad table file in ticket -> click "load" button, the error popup should show VOTable parsing error instead of "Could not recognize the file type" error which is misleading.
Go to TAP -> Spatial -> Multi-object -> Upload the bad table file in ticket -> click "load" button, it should show an error popup with same error message as Upload tab.