• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

supabase / supavisor / 21979016732

13 Feb 2026 07:51AM UTC coverage: 75.945% (+2.0%) from 73.948%
21979016732

Pull #841

github

web-flow
Merge d6420ab5a into bdcbf2f18
Pull Request #841: Improve errors, add error codes

141 of 201 new or added lines in 42 files covered. (70.15%)

8 existing lines in 3 files now uncovered.

2090 of 2752 relevant lines covered (75.94%)

4456.2 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/lib/supavisor/client_handler/proxy.ex
1
defmodule Supavisor.ClientHandler.Proxy do
2
  @moduledoc """
3
  Handles proxy connection logic for ClientHandler.
4

5
  This module prepares proxy connections and database handler arguments
6
  while leaving socket operations and process management to ClientHandler.
7
  """
8

9
  @spec prepare_proxy_connection(map()) ::
10
          {:ok, map()} | {:error, Supavisor.Errors.PoolRanchNotFoundError.t()}
11
  def prepare_proxy_connection(data) do
12
    case Supavisor.get_pool_ranch(data.id) do
×
13
      {:ok, %{port: port, host: host}} ->
14
        updated_auth =
×
15
          Map.merge(data.auth, %{
×
16
            port: port,
17
            host: to_charlist(host),
18
            ip_version: :inet,
19
            upstream_ssl: false,
20
            upstream_tls_ca: nil,
21
            upstream_verify: nil
22
          })
23

24
        {:ok, %{data | auth: updated_auth}}
25

26
      {:error, _} = error ->
NEW
27
        error
×
28
    end
29
  end
30

31
  @spec build_db_handler_args(map()) :: map()
32
  def build_db_handler_args(data) do
33
    %{
×
34
      id: data.id,
×
35
      auth: data.auth,
×
36
      user: data.user,
×
37
      tenant: {:single, data.tenant},
×
38
      tenant_feature_flags: data.tenant_feature_flags,
×
39
      replica_type: :write,
40
      mode: :proxy,
41
      proxy: true,
42
      log_level: nil
43
    }
44
  end
45
end
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc