Custom Exception Error message

How can we customize the error while raising exception for example if I raise AuthenticationError I want to show custom message in response or even if I generate an exception it should appear as message not traceback

You can use error logs for your specific error messges and also show custom message in response.