be.looorent.ponto.client.http.HttpClientException Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of ponto-client Show documentation
Show all versions of ponto-client Show documentation
Client library for Ponto (https://myponto.com)
The newest version!
package be.looorent.ponto.client.http;
import java.net.URL;
import java.util.Collection;
import static java.util.Collections.emptyList;
public class HttpClientException extends RuntimeException {
private final Collection errors;
HttpClientException(Throwable cause) {
super("An error occurred when calling Ponto's REST API", cause);
this.errors = emptyList();
}
HttpClientException(URL url, int statusCode, HttpErrors errors) {
super("Url: "+url+"; Response code: "+statusCode);
this.errors = errors.getErrors();
}
public Collection getErrors() {
return errors;
}
}