From b9e95a0b04527cfd45078c3805e22ee84aff3656 Mon Sep 17 00:00:00 2001 From: Landon Reed Date: Mon, 6 May 2019 14:54:12 -0400 Subject: [PATCH] refactor(merge-feeds): add description for exception --- .../manager/controllers/api/FeedVersionController.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/conveyal/datatools/manager/controllers/api/FeedVersionController.java b/src/main/java/com/conveyal/datatools/manager/controllers/api/FeedVersionController.java index e6edde333..a8be71617 100644 --- a/src/main/java/com/conveyal/datatools/manager/controllers/api/FeedVersionController.java +++ b/src/main/java/com/conveyal/datatools/manager/controllers/api/FeedVersionController.java @@ -280,7 +280,9 @@ private static String mergeFeedVersions(Request req, Response res) { MergeFeedsType mergeType; try { mergeType = MergeFeedsType.valueOf(req.queryParams("mergeType")); - if (mergeType.equals(REGIONAL)) throw new IllegalArgumentException(); + if (mergeType.equals(REGIONAL)) { + throw new IllegalArgumentException("Regional merge type is not permitted for this endpoint."); + } } catch (IllegalArgumentException e) { logMessageAndHalt(req, 400, "Must provide valid merge type.", e); return null;