Uploaded image for project: 'CDAP'
  1. CDAP
  2. CDAP-7998

NamespaceImpersonator.getUGI() should throw NamespaceNotFoundException if namespace does not exist

    Details

    • Rank:
      1|hzzrmv:

      Description

      Currently, if the namespace does not exist, the NamespaceQueryAdmin.get() throws NamespaceNotFoundException, but getUGI() catches that and propagates it as a RuntimeException. Hence the caller has no idea what the problem is and can only bail out.

      If this method would declare that it throws NamespaceNotFoundException, then the caller would be required to handle it, meaning the person who writes that caller code would be aware that this an expected error. This would greatly improve the error handling.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                vinisha Vinisha Shah
                Reporter:
                andreas Andreas Neumann
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: