Display error message and stop execution

You can use wix-location.to() for the redirect. See the examples.

When you open the Lightbox, you can also get the close, and do the redirect there:

import wixLocation from "wix-location";
import wixWindow from "wix-window";

wixWindow.openLightbox("LightboxName")
   .then( (data) => {
   let receivedData = data; // returned data if needed
   wixLocation.to("/something-interesting");
} );

I hope this helps,

Yisrael