@@ -0,0 +1,1528 @@
+/*%0A * Copyright 2014 Open mHealth%0A *%0A * Licensed under the Apache License, Version 2.0 (the %22License%22);%0A * you may not use this file except in compliance with the License.%0A * You may obtain a copy of the License at%0A *%0A *     http://www.apache.org/licenses/LICENSE-2.0%0A *%0A * Unless required by applicable law or agreed to in writing, software%0A * distributed under the License is distributed on an %22AS IS%22 BASIS,%0A * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.%0A * See the License for the specific language governing permissions and%0A * limitations under the License.%0A */%0A%0Apackage org.openmhealth.dsu.controller;%0A%0Aimport org.slf4j.Logger;%0Aimport org.slf4j.LoggerFactory;%0Aimport org.springframework.http.HttpStatus;%0Aimport org.springframework.web.bind.annotation.ControllerAdvice;%0Aimport org.springframework.web.bind.annotation.ExceptionHandler;%0Aimport org.springframework.web.bind.annotation.ResponseStatus;%0A%0A%0A/**%0A * A set of exception handlers that are applied to all controllers, primarily to prevent information disclosure.%0A *%0A * @author Emerson Farrugia%0A */%0A@ControllerAdvice%0Apublic class ExceptionHandlingControllerAdvice %7B%0A%0A    private static final Logger log = LoggerFactory.getLogger(ExceptionHandlingControllerAdvice.class);%0A%0A%0A    @ExceptionHandler(Exception.class)%0A    @ResponseStatus(HttpStatus.INTERNAL_SERVER_ERROR)%0A    public void handleException(Exception e) %7B%0A%0A        log.error(%22The following API exception is being swallowed to prevent it from being passed to the browser.%22, e);%0A    %7D%0A%7D

Add an exception handling fallback for all controllers.