From e9f365ecbbdf20a67e81179780121f3f922a87c6 Mon Sep 17 00:00:00 2001 From: Thomas Lenz Date: Tue, 17 Jun 2014 13:51:22 +0200 Subject: redirect to dispatch error is not necessary if SP protocol does not support errormessages --- .../gv/egovernment/moa/id/entrypoints/DispatcherServlet.java | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'id') diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/entrypoints/DispatcherServlet.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/entrypoints/DispatcherServlet.java index 3a5026948..0d34fcb87 100644 --- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/entrypoints/DispatcherServlet.java +++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/entrypoints/DispatcherServlet.java @@ -493,14 +493,18 @@ public class DispatcherServlet extends AuthServlet{ } catch (Throwable e) { Logger.warn("An authentication error occured: ", e);; // Try handle module specific, if not possible rethrow - if (!info.generateErrorMessage(e, req, resp, protocolRequest)) { - throw e; - } + if (!info.generateErrorMessage(e, req, resp, protocolRequest)) + handleErrorNoRedirect(e.getMessage(), e, req, + resp); + } + } catch (WrongParametersException ex) { handleWrongParameters(ex, req, resp); + } catch (MOAIDException ex) { handleError(null, ex, req, resp, protocolRequestID); + } catch (Throwable e) { handleErrorNoRedirect(e.getMessage(), e, req, resp); -- cgit v1.2.3