Skip to content
This repository has been archived by the owner on Jun 7, 2024. It is now read-only.

Commit

Permalink
ARUHA-523 Fail gracefully if storage type is not permitted
Browse files Browse the repository at this point in the history
  • Loading branch information
Lionel Montrieux committed Jan 31, 2017
1 parent b010dd7 commit 4a86309
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/main/java/org/zalando/nakadi/service/StorageService.java
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,8 @@ public Result<Void> createStorage(final JSONObject json) {
configuration = json.getJSONObject("kafka_configuration");
break;
default:
configuration = new JSONObject();
return Result.problem(Problem.valueOf(UNPROCESSABLE_ENTITY,
"Type '" + type + "' is not a valid storage type"));
}
} catch (JSONException e) {
return Result.problem(Problem.valueOf(UNPROCESSABLE_ENTITY, e.getMessage()));
Expand Down

0 comments on commit 4a86309

Please sign in to comment.