Error when creating Email Account

When I am creating a new email account an error occurred:-

Server Error
TypeError: Object of type ‘error’ is not JSON serializable.

How to resolve this?