From c05535c2a7e833c5e831e3774b4440d6459918dd Mon Sep 17 00:00:00 2001
From: James Moger <james.moger@gitblit.com>
Date: Wed, 26 Oct 2011 17:07:11 -0400
Subject: [PATCH] Documentation.
---
src/com/gitblit/utils/JsonUtils.java | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/src/com/gitblit/utils/JsonUtils.java b/src/com/gitblit/utils/JsonUtils.java
index fee7990..0c78df9 100644
--- a/src/com/gitblit/utils/JsonUtils.java
+++ b/src/com/gitblit/utils/JsonUtils.java
@@ -47,6 +47,7 @@
import com.gitblit.GitBlitException.ForbiddenException;
import com.gitblit.GitBlitException.UnauthorizedException;
+import com.gitblit.GitBlitException.UnknownRequestException;
import com.gitblit.models.RepositoryModel;
import com.gitblit.models.UserModel;
import com.google.gson.Gson;
@@ -277,6 +278,9 @@
} else if (e.getMessage().indexOf("403") > -1) {
// requested url is forbidden by the requesting user
throw new ForbiddenException(url);
+ } else if (e.getMessage().indexOf("501") > -1) {
+ // requested url is not recognized by the server
+ throw new UnknownRequestException(url);
}
throw e;
}
--
Gitblit v1.9.1