Commit eae8c970 authored by Piotr Gawron's avatar Piotr Gawron
Browse files

fix after hgnc api started giving different response for invalid ids

parent 6450f024
......@@ -14,6 +14,7 @@ import lcsb.mapviewer.annotation.cache.WebPageDownloader;
import lcsb.mapviewer.annotation.services.ExternalServiceStatus;
import lcsb.mapviewer.annotation.services.ExternalServiceStatusType;
import lcsb.mapviewer.annotation.services.IExternalService;
import lcsb.mapviewer.annotation.services.WrongResponseCodeIOException;
import lcsb.mapviewer.common.exception.InvalidArgumentException;
import lcsb.mapviewer.common.exception.InvalidXmlSchemaException;
import lcsb.mapviewer.model.map.BioEntity;
......@@ -231,6 +232,8 @@ public class HgncAnnotator extends ElementAnnotator implements IExternalService
}
}
}
} catch (WrongResponseCodeIOException e) {
logger.warn(prefix + "Cannot find information for element.");
} catch (Exception e) {
throw new AnnotatorException(e);
}
......@@ -314,7 +317,10 @@ public class HgncAnnotator extends ElementAnnotator implements IExternalService
}
}
return result;
} catch (Exception e) {
} catch (WrongResponseCodeIOException e) {
logger.warn("No HGNC data found for id: "+miriamData);
return new ArrayList<>();
} catch (Exception e) {
throw new AnnotatorException(e);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment