com.datarobot.impl.ClientException Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of datarobot-ai-java Show documentation
Show all versions of datarobot-ai-java Show documentation
This java client library allows you to quickly and easily communicate with the
DataRobot AI API to add Machine Learning to your applications.
The newest version!
package com.datarobot.impl;
import com.datarobot.model.ErrorResponse;
public class ClientException extends Exception {
private int statusCode;
private ErrorResponse errorResponse;
public ClientException(String message) {
super(message);
}
public ClientException(String message, Exception inner) {
super(message, inner);
}
public ClientException(String message, ErrorResponse response)
{
super(message);
if (response != null) {
this.statusCode = response.getStatusCode();
}
this.errorResponse = response;
}
public ClientException(String message, ErrorResponse response, Exception inner)
{
super(message, inner);
if (response != null) {
this.statusCode = response.getStatusCode();
}
this.errorResponse = response;
}
public ClientException(String message, int statusCode, Exception inner)
{
super(message, inner);
this.statusCode = statusCode;
}
public int getStatusCode() {
return this.statusCode;
}
public void setStatusCode(int statusCode) {
}
public ErrorResponse getErrorResponse() {
return this.errorResponse;
}
public void setErrorResponse(ErrorResponse errorResponse) {
this.errorResponse = errorResponse;
}
}