Open AmandaBirmingham opened 5 years ago
Thanks @AmandaBirmingham ! This looks like another good entry-level issue for @fedarko and/or @qiyunzhu and myself.
@fedarko @qiyunzhu @charles-cowart Whoever is tackling this, please use the .fail(function(..))
on the ajax call (see skeleton example below in addPlateModal.js) to set up explicit ajax error handling.
Currently, PoolListHandler.get throws a 500 error if it is passed a pool type that it doesn't recognize. This is as it should be :) However, one of the places this get is used is within an ajax call in sequencing.html:
https://github.com/jdereus/labman/blob/46241e448edd4fc615aeea914e8dd80bf88aad79/labcontrol/gui/templates/sequencing.html#L100-L108
At the moment there is no handling in place for errors from this ajax call, so if the 500 error is encountered, it is not handled and the code just keeps running. This leads to a cryptic error later in which the DataTable cannot be created because no results were returned from the ajax call:
At least the user can't make a garbage output, but clearly we could do better here.
This issue should be addressed before adding any new protocols to the software (as those could lead to new pool types). Related to #509 Centralize and harden identification of pool component types and probably to #510 PoolListHandler.get would identify pools from future new protocols as amplicon sequencing pools . Similar to #405 Silent 500 errors when plating samples.