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/GitBlitException.java |   15 ++++++++++++++-
 1 files changed, 14 insertions(+), 1 deletions(-)

diff --git a/src/com/gitblit/GitBlitException.java b/src/com/gitblit/GitBlitException.java
index 1111463..360f9f0 100644
--- a/src/com/gitblit/GitBlitException.java
+++ b/src/com/gitblit/GitBlitException.java
@@ -56,7 +56,20 @@
 			super(message);
 		}
 	}
-	
+
+	/**
+	 * Exception to indicate that the requested action has been disabled on the
+	 * Gitblit server.
+	 */
+	public static class NotAllowedException extends GitBlitException {
+
+		private static final long serialVersionUID = 1L;
+
+		public NotAllowedException(String message) {
+			super(message);
+		}
+	}
+
 	/**
 	 * Exception to indicate that the requested action can not be executed by
 	 * the server because it does not recognize the request type.

--
Gitblit v1.9.1