From b7079c3d322fc5f8606aa464175d07820ec514d1 Mon Sep 17 00:00:00 2001 From: Lionel Montrieux Date: Wed, 1 Feb 2017 11:50:20 +0100 Subject: [PATCH] ARUHA-523 Refactoring --- src/main/java/org/zalando/nakadi/service/StorageService.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/main/java/org/zalando/nakadi/service/StorageService.java b/src/main/java/org/zalando/nakadi/service/StorageService.java index e46d901391..2496fd4d05 100644 --- a/src/main/java/org/zalando/nakadi/service/StorageService.java +++ b/src/main/java/org/zalando/nakadi/service/StorageService.java @@ -87,10 +87,8 @@ public Result createStorage(final JSONObject json) { try { storageDbRepository.createStorage(storage); - } catch (DuplicatedStorageIdException e) { + } catch (DuplicatedStorageIdException | InternalNakadiException e) { return Result.problem(e.asProblem()); - } catch (InternalNakadiException e) { - return Result.problem(Problem.valueOf(INTERNAL_SERVER_ERROR, e.getMessage())); } return Result.ok();