Class ClientSecurityExceptionMessageResolver


  • @ApplicationScoped
    public class ClientSecurityExceptionMessageResolver
    extends Object
    It resolves the security management exception messages for being presented to the end users,
    • Constructor Detail

      • ClientSecurityExceptionMessageResolver

        public ClientSecurityExceptionMessageResolver()
    • Method Detail

      • registerMessageResolvers

        @PostConstruct
        public void registerMessageResolvers()
      • consumeExceptionMessage

        public void consumeExceptionMessage​(Throwable exception,
                                            Consumer<String> messageConsumer)
        Main entry point for handling all security management related errors. It uses the error's message, if any, otherwise uses the exception generic message. It also skips certain exception types for being displayed to the user and constantly showing popup error messages.
        Parameters:
        exception - The exception for being displayed
        messageConsumer - Consumes the message to display, if applies. Otherwise it's not called.