const isDev = typeof process !== 'undefined' && process.env.NODE_ENV !== 'production'; and tries to directly access the DO at http://127.0.0.1:8787/__debug__/... when using the DO binding RPC method invocation fails (in the catch block of a try/catch) when isDev, but it feels really hacky and it hardcodes the port number so it fails when the port number has to be incremented because it’s in use, so it’s brittle.