Skip to content

Commit

Permalink
feat: surface connection errors as stack events (#2162)
Browse files Browse the repository at this point in the history
  • Loading branch information
icehaunter authored Dec 16, 2024
1 parent f25a1ec commit b479bfa
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions packages/sync-service/lib/electric/connection/manager.ex
Original file line number Diff line number Diff line change
Expand Up @@ -538,6 +538,12 @@ defmodule Electric.Connection.Manager do

Logger.warning("Database connection in #{mode} mode failed: #{message}")

Electric.StackSupervisor.dispatch_stack_event(
state.stack_events_registry,
state.stack_id,
{:database_connection_failed, message}
)

step =
cond do
is_nil(state.lock_connection_pid) -> :start_lock_connection
Expand Down

0 comments on commit b479bfa

Please sign in to comment.