]> source.dussan.org Git - jgit.git/commitdiff
Clearer error message when service is not enabled 26/43926/4
authorHector Oswaldo Caballero <hector.caballero@ericsson.com>
Mon, 16 Mar 2015 12:48:56 +0000 (08:48 -0400)
committerMatthias Sohn <matthias.sohn@sap.com>
Fri, 3 Apr 2015 12:29:08 +0000 (08:29 -0400)
When a user tried to use a service not enabled in the remote server
a misleading error  message was given:

   fatal: remote error: Git access forbidden

This patch modifies the error message to make the cause clearer
to the user. Now, when the user tries to use a not enabled service,
the message error clearly states it:

   fatal: remote error: Service not enabled

Change-Id: If096c4ddd17c5aae0e99e3ea6eea4b69bd3c5466
Signed-off-by: Hector Oswaldo Caballero <hector.caballero@ericsson.com>
org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/SmartServiceInfoRefs.java

index 48107537793f926a92ccae64347953041b8a9e62..51332194b8b6695bc9df1fafd7e7b854c4c96539 100644 (file)
@@ -101,7 +101,7 @@ abstract class SmartServiceInfoRefs implements Filter {
                                res.sendError(SC_UNAUTHORIZED);
                                return;
                        } catch (ServiceNotEnabledException e) {
-                               sendError(req, res, SC_FORBIDDEN);
+                               sendError(req, res, SC_FORBIDDEN, e.getMessage());
                                return;
                        }