Skip to content

Improve Error Message on addition of duplicate list owner/moderator

This is regarding Issue #83 Listed in Postorius https://gitlab.com/mailman/postorius/issues/83 . But the I worked out is to make changes on mailman. After understanding the rest application flow and digging through the code, I pinpointed the problem to lack of an AlreadySubscribedError exception case in the mailman/rest/members.py after line 317. Thus my fix would be to add an exception case there which would include a bad_request error containing the "appropriate" message. Right now, the Internal Server Error is probably displayed due to lack of appropriate exception case. For now, i added this in my dev environment: except BaseException as e: bad_request(response, str(e)) return This gives an error message as : abc@xyz.com is already a MemberRole.owner of mailing list first@try.com This message can obviously be modified to a more appropriate one.

Merge request reports