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

supabase / supavisor / 22906196335
82%

Build:
DEFAULT BRANCH: main
Ran 10 Mar 2026 02:08PM UTC
Jobs 2
Files 110
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

10 Mar 2026 01:59PM UTC coverage: 79.55% (+3.2%) from 76.338%
22906196335

push

github

web-flow
feat: improve errors, add error codes (#841)

This changes a lot of errors from being atoms handled ad-hoc to be
structured errors. Structured errors allow us to have more
error-associated behavior, for example, every error can have a code, and
associated information to be used in logs. These structured errors also
allow us to have shared code paths in the caller code, reducing the
complexity of error handling in core parts of the codebase (e.g.: the
connection state machines).

This PR introduces an error behaviour (which is used alongside the
Exception behaviour) which has callbacks for log message and protocol
message (to be sent on the wire if this error happens for a client
connection), and an Error use-macro which makes the behaviour
implementation simple and does basic validation (does this error have a
code?).

It also introduces a new assertion, which we can use on returned errors,
to ensure that they are loggable and won't crash with the behaviour 
implementation. I haven't implemented it everywhere yet, but I think
it's a good addition for coverage.

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **New Features**
* Standardized, structured error types with machine-readable codes and a
new API to expose the max startup packet size.

* **Bug Fixes**
* More explicit, consistent error responses for auth, SSL/handshake,
subscription, pool/worker not-found, checkout timeouts and client-limit
conditions.
* Improved PostgreSQL protocol error formatting and unified
error-handling pathways.

* **Tests**
* Expanded test coverage to assert new error shapes and startup/checkout
edge cases; added validation helpers for error formatting.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

181 of 224 new or added lines in 45 files covered. (80.8%)

5 existing lines in 4 files now uncovered.

2369 of 2978 relevant lines covered (79.55%)

57920.32 hits per line

New Missed Lines in Diff

Lines Coverage ∆ File
1
91.67
52.43% lib/supavisor/client_handler/error.ex
1
89.94
1.85% lib/supavisor/db_handler.ex
1
0.0
lib/supavisor/errors/address_not_allowed_error.ex
1
0.0
lib/supavisor/errors/auth_secrets_error.ex
1
0.0
lib/supavisor/errors/failed_to_start_proxy_connection_error.ex
1
80.0
lib/supavisor/errors/jit_unauthorized_error.ex
1
0.0
lib/supavisor/errors/pool_checkout_error.ex
1
0.0
lib/supavisor/errors/proxy_supervisor_unavailable_error.ex
1
0.0
lib/supavisor/errors/ssl_required_error.ex
1
0.0
lib/supavisor/errors/subscribe_retries_exhausted_error.ex
1
80.0
lib/supavisor/errors/wrong_password_error.ex
2
82.05
1.54% lib/supavisor/client_handler/auth.ex
2
0.0
lib/supavisor/errors/ssl_handshake_error.ex
8
0.0
lib/supavisor/errors/auth_timeout_error.ex
9
0.0
lib/supavisor/errors/auth_protocol_error.ex
11
91.49
7.86% lib/supavisor/client_handler.ex

Uncovered Existing Lines

Lines Coverage ∆ File
1
92.47
-1.14% lib/supavisor/secret_checker.ex
1
70.37
-3.7% lib/supavisor/metrics_cleaner.ex
1
69.05
0.35% lib/supavisor.ex
2
82.05
1.54% lib/supavisor/client_handler/auth.ex
Jobs
ID Job ID Ran Files Coverage
1 run-integration - 22906196335.1 10 Mar 2026 02:08PM UTC 110
43.02
GitHub Action Run
2 run-tests - 22906196335.2 10 Mar 2026 02:08PM UTC 110
78.01
GitHub Action Run
Source Files on build 22906196335
  • Tree
  • List 110
  • Changed 27
  • Source Changed 18
  • Coverage Changed 26
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #22906196335
  • 71eb86b7 on github
  • Prev Build on main (#22808171081)
  • Next Build on main (#22924226985)
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