Handle `edgedb watch` flow more gracefully in driver
2023-06-08T08:43:49Z app[3d8d9795c07218] lax [info]ExecutionError: error when trying to update the schema.
2023-06-08T08:43:49Z app[3d8d9795c07218] lax [info] Original error: Migration cannot be automatically populated
When running edgedb watch or when restarting the underlying Postgres instance for an EdgeDB instance, ExecutionError or ClientConnectionClosedError may be thrown. It would be great to have support for retrying queries in this case.
One idea here is to allow customizing the error handling to specifically try restarting in some cases. I think a more holistic solution that attempts to detect the disconnect at the connection level might be a good thing to explore here. I believe there might be multiple individual solutions that end up solving the issues encountered during development without having to add a lot of runtime dynamism to your configuration based on environment.