--- /dev/null
+package de.juplo.facebook.exceptions;
+
+
+/**
+ * 2200: Callback verification failed.
+ * @author Kai Moritz
+ */
+public class CallbackVerificationFailedException extends OAuthException
+{
+ protected CallbackVerificationFailedException(FacebookErrorMessage error)
+ {
+ super(error);
+ }
+}
// 950..999: batch api errors
// 1000..1099: event api errors
// 1100..1199: live-message errors
+ case 2200: return new CallbackVerificationFailedException(error);
default:
LOG.info("unmapped error: {}", error);
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()
{