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

supabase / supavisor / 21983118864

13 Feb 2026 10:16AM UTC coverage: 76.663% (+2.7%) from 73.948%
21983118864

Pull #841

github

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

157 of 202 new or added lines in 42 files covered. (77.72%)

5 existing lines in 2 files now uncovered.

2109 of 2751 relevant lines covered (76.66%)

4469.85 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