com.smartbear.readyapi.client.execution.ApiException Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of ready-api-testserver-client Show documentation
Show all versions of ready-api-testserver-client Show documentation
Java client library for creating and executing test recipes against Ready!API TestServer
package com.smartbear.readyapi.client.execution;
import com.fasterxml.jackson.core.JsonProcessingException;
import javax.ws.rs.core.MultivaluedMap;
public class ApiException extends RuntimeException {
private String message;
private int statusCode;
private String responseBody;
private MultivaluedMap headers;
public ApiException(int statusCode, String responseBody, MultivaluedMap headers) {
this.statusCode = statusCode;
this.responseBody = responseBody;
this.headers = headers;
}
public ApiException(int statusCode, String message) {
this.statusCode = statusCode;
this.message = message;
}
public ApiException(Exception e) {
super(e);
}
@Override
public String toString() {
return getClass().getName() + "{" +
"code=" + statusCode +
", message=" + message != null ? message : responseBody +
", responseHeaders=" + headers +
", responseBody='" + responseBody + '\'' +
'}';
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy