/** * @return The basic set of handler listeners that are appropriate for most Riposte applications. */ @Provides @Singleton @SuppressWarnings("unused") public List<ApiExceptionHandlerListener> apiExceptionHandlerListeners(ProjectApiErrors projectApiErrors, ApiExceptionHandlerUtils utils) { return BackstopperRiposteConfigHelper.defaultHandlerListeners(projectApiErrors, utils); }
/** * Returns a {@link RiposteErrorHandler} that uses the given {@link ProjectApiErrors}, and {@link * #defaultHandlerListeners(ProjectApiErrors, ApiExceptionHandlerUtils)} for the error handler listeners. */ public static RiposteErrorHandler defaultErrorHandler(ProjectApiErrors projectApiErrors, ApiExceptionHandlerUtils utils) { return new RiposteApiExceptionHandler( projectApiErrors, defaultHandlerListeners(projectApiErrors, utils), utils ); }