Browse Source

Clearer error message when service is not enabled

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>
stable-4.1
Hector Oswaldo Caballero 10 years ago committed by Matthias Sohn
parent
commit
cbb617603a
  1. 2
      org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/SmartServiceInfoRefs.java

2
org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/SmartServiceInfoRefs.java

@ -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;
}

Loading…
Cancel
Save