package de.juplo.facebook.client;
import de.juplo.facebook.exceptions.AccessTokenRequiredException;
+import de.juplo.facebook.exceptions.CallbackVerificationFailedException;
import de.juplo.facebook.exceptions.UnsupportedGetRequestException;
import de.juplo.facebook.exceptions.UnexpectedErrorException;
import de.juplo.facebook.exceptions.RateExceededException;
}
}
+ @Test
+ public void testError2200()
+ {
+ requestFactory.setBody("{\"error\":{\"message\":\"(#2200) callback verification failed: \",\"type\":\"OAuthException\",\"code\":2200,\"fbtrace_id\":\"ESLjoZKvPXg\"}}");
+
+ try
+ {
+ clientTemplate.getForObject("ANY", SOME.class);
+ fail("The expected exception was not thrown");
+ }
+ catch(CallbackVerificationFailedException e)
+ {
+ log.debug("{}", e.toString());
+ assertEquals("invalid_request", e.getOAuth2ErrorCode());
+ assertEquals(new Integer(2200), e.getCode());
+ assertEquals("(#2200) callback verification failed: ", e.getMessage());
+ assertEquals(Type.OAuthException, e.getType());
+ assertEquals("ESLjoZKvPXg", e.getTraceId());
+ }
+ }
+
@Test
public void testUnmappedError()
{