Unauthorized error messages on login page

Hello,

Is the sign in page allowed to show unauthorized errors from rules? I’ve used the code below with the hosted login page with Custom UI configurations and it has not worked.

function (user, context, callback) {
return callback(new UnauthorizedError('This is an error'));
}

Maybe it’s supposed to display the error message within the <div id="error-message" class="alert alert-danger"></div> tags like this image?

error%20message

Hey there!

Sorry for such delay in response! We’re doing our best in providing the best developer support experience out there, but sometimes the number of incoming questions is just too big for our bandwidth. Sorry for such inconvenience!

Do you still require further assistance from us?