#4847 Print PublicError traceback when in debug mode
Closed: Fixed None Opened 9 years ago by mkosek.

The framework only shows traceback for the internal/unknown errors, recognized PublicErrors are simply passed back to the FreeIPA clients.

However, sometimes it would help to see a traceback of the PublicError to for example see exactly which line returns a NotFound or NetworkError (example use case).

The change would be quite simple (rpcserver.py):

...
                result = self.Command[name](*args, **options)
        except PublicError, e:
            error = e
            if api.env.debug:
                import traceback
                traceback.print_exc()
        except StandardError, e:
...

Patch freeipa-mkosek-493-print-publicerror-traceback-when-in-debug-mode.patch sent for review

master:

  • 834c911 Print PublicError traceback when in debug mode

ipa-4-1:

  • 877321e Print PublicError traceback when in debug mode

Metadata Update from @mkosek:
- Issue assigned to mkosek
- Issue set to the milestone: FreeIPA 4.1.3

7 years ago

Login to comment on this ticket.

Metadata