SAML-Toolkits / python3-saml

MIT License
671 stars 302 forks source link

OneLogin_Saml2_Settings raises error messages containing specific terms #325

Closed galynazholtkevych closed 1 year ago

galynazholtkevych commented 1 year ago

Instantiating OneLogin_Saml2_Settings in our application and in the case of exception we get error messages, that are not general to parse them (e.g. 'Invalid dict settings: something went wrong',). We basically would like to have more general error messages, that are not referencing to Language specific terms or another stuff that is not interesting for a user. Like this we could handle the errors from Saml library and throw more user-friendly messages. Otherwise we would need to implement separately way for handling specific SAML errors, which is not desirable behaviour

The example of error raising: https://github.com/onelogin/python3-saml/blob/master/src/onelogin/saml2/settings.py#L128

Thanks!

pitbulk commented 1 year ago

You can always create your own dict validator and use it before using the dict on the python3-saml toolkit.