Hi Chris,
This is possible using the Web Message SDK. The idea would be that once the error event occurs, you send the Open command, Chat. It is important to understand that the SDK is segmented according to certain characteristics and that you can get commands and event subscriptions.
Here is the link to the official documentation.
https://developer.genesys.cloud/commdigital/digital/webmessaging/messengersdk/
https://developer.genesys.cloud/commdigital/digital/webmessaging/messengersdk/SDKCommandsEvents/
Best Regards,
------------------------------
Daniel Rodriguez
------------------------------