[web] Use getMessageForException in shared worker connectHandler
Summary: This is safer, since technically in JS anything can be thrown (doesn't have to be an Error)
Test Plan: Flow
Reviewers: michal, will
Reviewed By: will
Subscribers: tomek
Differential Revision: https://phab.comm.dev/D11562