From 8b76369fb44bfd863b27bcede453d676905f52e5 Mon Sep 17 00:00:00 2001
From: James Moger <james.moger@gitblit.com>
Date: Wed, 26 Oct 2011 17:12:50 -0400
Subject: [PATCH] Properly catch Not Allowed (405) and Unknown Request (501) errors

---
 src/com/gitblit/client/GitblitManager.java |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/src/com/gitblit/client/GitblitManager.java b/src/com/gitblit/client/GitblitManager.java
index d902c59..524c213 100644
--- a/src/com/gitblit/client/GitblitManager.java
+++ b/src/com/gitblit/client/GitblitManager.java
@@ -65,6 +65,7 @@
 import org.eclipse.jgit.util.FS;
 
 import com.gitblit.Constants;
+import com.gitblit.GitBlitException.ForbiddenException;
 import com.gitblit.utils.StringUtils;
 
 /**
@@ -277,6 +278,12 @@
 					if (cause instanceof ConnectException) {
 						JOptionPane.showMessageDialog(GitblitManager.this, cause.getMessage(),
 								Translation.get("gb.error"), JOptionPane.ERROR_MESSAGE);
+					} else if (cause instanceof ForbiddenException) {
+						JOptionPane
+								.showMessageDialog(
+										GitblitManager.this,
+										"This Gitblit server does not allow RPC Management or Administration",
+										Translation.get("gb.error"), JOptionPane.ERROR_MESSAGE);
 					} else {
 						Utils.showException(GitblitManager.this, t);
 					}

--
Gitblit v1.9.1