edgedb-js icon indicating copy to clipboard operation
edgedb-js copied to clipboard

Handle `edgedb watch` flow more gracefully in driver

Open lithdew opened this issue 2 years ago • 1 comments

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.

lithdew avatar Jun 08 '23 10:06 lithdew

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.

scotttrinh avatar Jun 08 '23 19:06 scotttrinh