#5473 Cryptic error messages emitted when calling api commands without connected backend
Closed: Fixed Opened by mbabinsk.

When running an API command without any connected backend, a very cryptic exception is raised:

AttributeError: no context.rpcclient_139710759475472 in thread 'MainThread'

This basically means that we have not established any connection before using IPA API.

Similarly, if I run api.Backend.rpcclient.disconnect() without creating connection first, I get:

disconnect: 'context.rpcclient_139710759475472' does not exist in thread 'MainThread'

We should make these messages more user friendly because they pop out from time to time e.g. in installers, and it is difficult even for developers to immediately discern what went wrong.


Not a blocker for 4.3.

ipa-4-3:

  • f1244a1058aba53b02f513403eb9cf009ffc42b1 raise more descriptive Backend connection-related exceptions

master:

  • cd5fa389450d15d5bc696131f73d062000d3558f raise more descriptive Backend connection-related exceptions

Metadata Update from @mbabinsk:
- Issue assigned to mbabinsk
- Issue set to the milestone: FreeIPA 4.3.1

Metadata