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>
This commit is contained in:
Hector Oswaldo Caballero 2015-03-16 08:48:56 -04:00 committed by Matthias Sohn
parent 81c84c088f
commit cbb617603a
1 changed files with 1 additions and 1 deletions

View File

@ -101,7 +101,7 @@ public void doFilter(ServletRequest request, ServletResponse response,
res.sendError(SC_UNAUTHORIZED);
return;
} catch (ServiceNotEnabledException e) {
sendError(req, res, SC_FORBIDDEN);
sendError(req, res, SC_FORBIDDEN, e.getMessage());
return;
}