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();