Details

    • Type: Improvement
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: CDAP Services
    • Labels:
      None
    • Rank:
      1|i00a73:

      Description

      It would be useful to be able to register some sort of error handler in a service program that gets the throwable thrown by a handler method and responds in some way.

      For example, my code can throw a custom InvalidAlgorithmException, and I always want that to result in a 400 with the exception message as the response body. Today, I have a utility method that executes some runnable, catches certain types of exceptions, and responds accordingly. I need to make sure every service endpoint uses this utility wrapper method, which is error prone and results in duplicate code and closures everywhere.

      This is basically the ExceptionHandler functionality that is in the netty-http library.

        Attachments

          Activity

            People

            • Assignee:
              bhooshan Bhooshan Mogal
              Reporter:
              ashau Albert Shau
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: