Merge pull request #16669 from aantix/dangerous_attribute_error_better_message

Improved the error messaging for the DangerousAttributeError exception