Error message customization with Universal Login / WebAuth

Hi, we are trying to use the Universal Login with a Custom Login page where we choose the “Custom Login Form” from the Templates dropdown. The template that’s in place uses the Auth0.js library ( WebAuth constructor ) and we are trying to understand to how customize various error messages that can come up in the course of signup / login. We do not think that the displayError() sample function correctly handles various err objects that are passed to it (e.g. the err object can contain another object and the UI displays it as [ object Object ] which is not meaningful / helpful to the end user), and we cannot seem to find documentation on what the err object can contain so we can write a more robust displayError(). We did find some information on this, but it’s not nearly as granular as some of the errors that might come up ( Invalid email, Password doesn’t conform to the policy which is … , Existing user please try resetting your password, etc, etc).

TIA for any insights on this.

function displayError(err) {
var errorMessage = document.getElementById(‘error-message’);
errorMessage.innerHTML = err; = ‘block’;