Skip to content
Snippets Groups Projects
Commit ac7c1d8a authored by Piotr Gawron's avatar Piotr Gawron
Browse files

check if type is proper reference genome type

parent d9130144
No related branches found
No related tags found
1 merge request!859Resolve "deprecacy information for data overlay"
......@@ -168,7 +168,12 @@ public class ReferenceGenomeRestImpl extends BaseRestImpl {
public List<Map<String, Object>> getReferenceGenomeVersions(String organismId, String type)
throws QueryException {
ReferenceGenomeType genomeType = ReferenceGenomeType.valueOf(type);
ReferenceGenomeType genomeType = null;
try {
genomeType = ReferenceGenomeType.valueOf(type);
} catch (IllegalArgumentException e) {
throw new QueryException("Invalid type: " + type);
}
MiriamData organism;
if (organismId != null && !organismId.isEmpty()) {
organism = new MiriamData(MiriamType.TAXONOMY, organismId);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment