The exception stores the HttpStatus and HttpHeaders of the failed request
[facebook-errors] / src / main / java / de / juplo / facebook / errors / PageMigratedException.java
index c339d83..3c7ee01 100644 (file)
@@ -3,6 +3,8 @@ package de.juplo.facebook.errors;
 
 import java.util.regex.Matcher;
 import java.util.regex.Pattern;
+import org.springframework.http.HttpHeaders;
+import org.springframework.http.HttpStatus;
 
 
 
@@ -18,9 +20,13 @@ public class PageMigratedException extends OAuthException
   private final Long oldId, newId;
 
 
-  protected PageMigratedException(FacebookErrorMessage error)
+  protected PageMigratedException(
+      HttpStatus status,
+      HttpHeaders headers,
+      FacebookErrorMessage error
+      )
   {
-    super(error);
+    super(status, headers, error);
     Matcher matcher = pattern.matcher(error.message);
     if (!matcher.find())
     {