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}}