From b55f8802ac5f4444919ec688a2ecd45ef793ee8d Mon Sep 17 00:00:00 2001 From: Shyri Villar Date: Sat, 7 Nov 2015 13:17:19 +0100 Subject: [PATCH] throw volley error on body post null [android-volley] --- .../src/main/resources/android-volley/api.mustache | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/swagger-codegen/src/main/resources/android-volley/api.mustache b/modules/swagger-codegen/src/main/resources/android-volley/api.mustache index 96f03dd18287..0feca99aef95 100644 --- a/modules/swagger-codegen/src/main/resources/android-volley/api.mustache +++ b/modules/swagger-codegen/src/main/resources/android-volley/api.mustache @@ -55,7 +55,8 @@ public class {{classname}} { {{#allParams}}{{#required}} // verify the required parameter '{{paramName}}' is set if ({{paramName}} == null) { - throw new ApiException(400, "Missing the required parameter '{{paramName}}' when calling {{nickname}}"); + VolleyError error = new VolleyError("Missing the required parameter '{{paramName}}' when calling {{nickname}}", + new ApiException(400, "Missing the required parameter '{{paramName}}' when calling {{nickname}}")); } {{/required}}{{/allParams}}