github.com/phrase/openapi@v0.0.0-20240514140800-49e8a106740e/openapi-generator/templates/java/libraries/microprofile/api_exception.mustache (about) 1 {{>licenseInfo}} 2 package {{apiPackage}}; 3 4 import javax.ws.rs.core.Response; 5 6 public class ApiException extends Exception { 7 8 private static final long serialVersionUID = 1L; 9 private Response response; 10 11 public ApiException() { 12 super(); 13 } 14 15 public ApiException(Response response) { 16 super("Api response has status code " + response.getStatus()); 17 this.response = response; 18 } 19 20 public Response getResponse() { 21 return this.response; 22 } 23 }