Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKevin Sawicki2012-02-29 18:18:26 -0500
committerKevin Sawicki2012-02-29 18:18:26 -0500
commit308ffcdcab99e00aac6c449f7fbf36c2995b60fa (patch)
treecdc53650869334ed827a8f1c1260a7f57c85df5a
parent2d56c92614468d7347f998ccbf21baeb3c783a6a (diff)
downloadegit-github-308ffcdcab99e00aac6c449f7fbf36c2995b60fa.tar.gz
egit-github-308ffcdcab99e00aac6c449f7fbf36c2995b60fa.tar.xz
egit-github-308ffcdcab99e00aac6c449f7fbf36c2995b60fa.zip
Handle 202 Accepted and 409 Conflict response codes
-rw-r--r--org.eclipse.egit.github.core/src/org/eclipse/egit/github/core/client/GitHubClient.java4
1 files changed, 4 insertions, 0 deletions
diff --git a/org.eclipse.egit.github.core/src/org/eclipse/egit/github/core/client/GitHubClient.java b/org.eclipse.egit.github.core/src/org/eclipse/egit/github/core/client/GitHubClient.java
index 75c49460..3aea990e 100644
--- a/org.eclipse.egit.github.core/src/org/eclipse/egit/github/core/client/GitHubClient.java
+++ b/org.eclipse.egit.github.core/src/org/eclipse/egit/github/core/client/GitHubClient.java
@@ -11,7 +11,9 @@
*******************************************************************************/
package org.eclipse.egit.github.core.client;
+import static java.net.HttpURLConnection.HTTP_ACCEPTED;
import static java.net.HttpURLConnection.HTTP_BAD_REQUEST;
+import static java.net.HttpURLConnection.HTTP_CONFLICT;
import static java.net.HttpURLConnection.HTTP_CREATED;
import static java.net.HttpURLConnection.HTTP_FORBIDDEN;
import static java.net.HttpURLConnection.HTTP_GONE;
@@ -418,6 +420,7 @@ public class GitHubClient {
case HTTP_UNAUTHORIZED:
case HTTP_FORBIDDEN:
case HTTP_NOT_FOUND:
+ case HTTP_CONFLICT:
case HTTP_GONE:
case HTTP_UNPROCESSABLE_ENTITY:
case HTTP_INTERNAL_ERROR:
@@ -437,6 +440,7 @@ public class GitHubClient {
switch (code) {
case HTTP_OK:
case HTTP_CREATED:
+ case HTTP_ACCEPTED:
return true;
default:
return false;

Back to the top