
com.podio.ExceptionFilter Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of api Show documentation
Show all versions of api Show documentation
The official Java wrapper for the Podio API
package com.podio;
import java.util.Map;
import javax.ws.rs.core.Response.Status.Family;
import com.sun.jersey.api.client.ClientHandlerException;
import com.sun.jersey.api.client.ClientRequest;
import com.sun.jersey.api.client.ClientResponse;
import com.sun.jersey.api.client.GenericType;
import com.sun.jersey.api.client.filter.ClientFilter;
public class ExceptionFilter extends ClientFilter {
@SuppressWarnings("unchecked")
@Override
public ClientResponse handle(ClientRequest cr)
throws ClientHandlerException {
try {
ClientResponse response = getNext().handle(cr);
if (response.getClientResponseStatus() == null
|| response.getClientResponseStatus().getFamily() != Family.SUCCESSFUL) {
Map errorData = response
.getEntity(new GenericType
© 2015 - 2025 Weber Informatics LLC | Privacy Policy