package de.juplo.facebook.exceptions;
-import de.juplo.facebook.exceptions.GraphApiException.FacebookErrorMessage;
-
-
/**
* 104: An access token is required to request this resource.
--- /dev/null
+package de.juplo.facebook.exceptions;
+
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+import com.fasterxml.jackson.annotation.JsonRootName;
+
+
+
+/**
+ * This class represents an error message from the Graph-API
+ *
+ * @see <a href="https://developers.facebook.com/docs/graph-api/using-graph-api/v2.5#errors">Graph-API Documentation</a>
+ * @author Kai Moritz
+ */
+@JsonRootName("error")
+@JsonPropertyOrder({
+ "message",
+ "type",
+ "code",
+ "error_subcode",
+ "error_user_title",
+ "error_user_msg",
+ "fbtrace_id"
+ })
+public class FacebookErrorMessage
+{
+ @JsonProperty("message")
+ String message;
+ @JsonProperty("type")
+ String type;
+ @JsonProperty("code")
+ Integer code;
+ @JsonProperty("error_subcode")
+ Integer subCode;
+ @JsonProperty("error_user_title")
+ String userTitle;
+ @JsonProperty("error_user_msg")
+ String userMessage;
+ @JsonProperty("fbtrace_id")
+ String traceId;
+}
package de.juplo.facebook.exceptions;
-import com.fasterxml.jackson.annotation.JsonProperty;
-import com.fasterxml.jackson.annotation.JsonPropertyOrder;
-import com.fasterxml.jackson.annotation.JsonRootName;
import com.fasterxml.jackson.core.JsonParseException;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.DeserializationFeature;
return e.getMessage();
}
}
-
-
- /**
- * This class represents an error message from the Graph-API
- *
- * @see <a href="https://developers.facebook.com/docs/graph-api/using-graph-api/v2.5#errors">Graph-API Documentation</a>
- */
- @JsonRootName("error")
- @JsonPropertyOrder({ "message", "type", "code", "error_subcode", "error_user_title", "error_user_msg", "fbtrace_id" })
- public static class FacebookErrorMessage
- {
- @JsonProperty("message")
- String message;
- @JsonProperty("type")
- String type;
- @JsonProperty("code")
- Integer code;
- @JsonProperty("error_subcode")
- Integer subCode;
- @JsonProperty("error_user_title")
- String userTitle;
- @JsonProperty("error_user_msg")
- String userMessage;
- @JsonProperty("fbtrace_id")
- String traceId;
- }
}
package de.juplo.facebook.exceptions;
-import de.juplo.facebook.exceptions.GraphApiException.FacebookErrorMessage;
-
-
/**
* Baseclass for exceptions of type {@code OAuthException}.
package de.juplo.facebook.exceptions;
-import de.juplo.facebook.exceptions.GraphApiException.FacebookErrorMessage;
-
-
/**
* 2: An unexpected error has occurred.
package de.juplo.facebook.exceptions;
-import de.juplo.facebook.exceptions.GraphApiException.FacebookErrorMessage;
-
-
/**
* 1: An unknown error has occurred.
package de.juplo.facebook.exceptions;
+
import com.fasterxml.jackson.core.JsonProcessingException;
-import de.juplo.facebook.exceptions.GraphApiException.FacebookErrorMessage;
import static de.juplo.facebook.exceptions.GraphApiException.OBJECT_MAPPER;
import de.juplo.facebook.exceptions.GraphApiException.Type;
import java.io.IOException;
import org.junit.Test;
import static org.junit.Assert.assertEquals;
+
+
/**
* @author Kai Moritz
*/