error handling for giving the predictor non-existent UUIDs
rodzic
70e7fb3387
commit
80edc67d72
|
@ -37,12 +37,17 @@ $(document).ready(function() {
|
|||
populateFormByUUID(current_uuid);
|
||||
appendDebug("Trying to get progress JSON");
|
||||
$.getJSON("preds/"+current_uuid+"/progress.json", function(progress) {
|
||||
appendDebug("Got progress JSON from server for UUID");
|
||||
if ( progress['error'] || !progress['pred_complete'] ) {
|
||||
appendDebug("The prediction was not completed correctly, quitting");
|
||||
if ( progress != null ) {
|
||||
appendDebug("Got progress JSON from server for UUID");
|
||||
if ( progress['error'] || !progress['pred_complete'] ) {
|
||||
appendDebug("The prediction was not completed correctly, quitting");
|
||||
} else {
|
||||
writePredictionInfo(current_uuid, progress['run_time'], progress['gfs_timestamp']);
|
||||
getCSV(current_uuid);
|
||||
}
|
||||
} else {
|
||||
writePredictionInfo(current_uuid, progress['run_time'], progress['gfs_timestamp']);
|
||||
getCSV(current_uuid);
|
||||
appendDebug("Couldn't find the progress JSON for the supplied UUID");
|
||||
throwError("You requested a UUID that doesn't seem to exist on the server. Please re-run");
|
||||
}
|
||||
});
|
||||
}
|
Ładowanie…
Reference in New Issue