MicroStrategy / mstrio-py

Python integration for MicroStrategy
Apache License 2.0
90 stars 60 forks source link

Raise specific errors on User Creation and User Group Creation #86

Closed DanDavies1989 closed 2 years ago

DanDavies1989 commented 2 years ago

Would it be possible to raise a custom error for the User.create method and the UserGroup.create method should the User or UserGroup already exist There is a message sent to the console but it appears that these are just HTTPError If we were able to catch a more specific error we could perhaps then check the enabled flag on the User

urszulajaczewska commented 2 years ago

Hi @DanDavies1989, we don't plan to change error massages for custom ones. HTTPErrors are used for further debugging errors on the I-Server side. If each time while creating User or User Group you have the same error and you want to catch it, you can check HTTPError message and based on that take proper action.

DanDavies1989 commented 2 years ago

@apiotrowskiMicroStrategy No worries thanks for the prompt reply I am catching the HTTPError which will be fine Thankyou!