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

supabase / supabase-flutter / 29563951630 / 8
87%
main: 87%

Build:
DEFAULT BRANCH: main
Ran 17 Jul 2026 07:47AM UTC
Files 16
Run time 0s
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

17 Jul 2026 07:42AM UTC coverage: 82.609%. Remained the same
29563951630.8

push

github

web-flow
fix(realtime_client): stop throwing internally when converting null cell values (#1612)

## What kind of change does this PR introduce?

Bug fix (internal exception noise; no observable behavior change).

## What is the current behavior?

`convertCell`'s doc comment says *"If the value of the cell is `null`,
returns null"* — but the code never checks for null. A null value in an
`int2/int4/int8/oid` (or `float4/float8/numeric`) column falls through
to `toInt`/`toDouble`, which do:

```dart
try {
  return int.parse(value.toString()); // null → "null" → FormatException
} catch (_) {
  return null;
}
```

So every `postgres_changes` payload containing a null numeric column
throws (and immediately catches) `FormatException: Invalid radix-10
number (at character 1) null` inside the library.

The converted result is correct, but the exception-as-control-flow fires
on **every CDC frame** for any subscribed table with nullable numeric
columns. In practice this means anyone debugging a realtime Flutter app
with "break on all exceptions" enabled gets stopped in
`integers_patch.dart` constantly, with no way to silence it from app
code.

For reference, realtime-js doesn't have this problem: its `toNumber`
only parses `typeof value === 'string'` and passes null through
untouched.

## What is the new behavior?

- `convertCell` short-circuits `null` → `null`, matching its own
documented behavior and realtime-js
- `toInt`/`toDouble` use `tryParse` instead of `parse` inside try/catch,
so unparseable strings also no longer throw internally

Output is unchanged for every input — existing tests already pin
`convertCell('int8', null) => null` and `convertCell('float8', null) =>
null`, and they still pass. Added direct unit tests for
`toInt`/`toDouble` covering null, empty, and non-numeric inputs.

## Additional context

Repro: subscribe to `postgres_changes` on any table with a nullable
`integer` column, update a row while the column is null, run with a
debugger set to br... (continued)

399 of 483 relevant lines covered (82.61%)

2.39 hits per line

Source Files on job supabase - 29563951630.8
  • Tree
  • List 16
  • Changed 0
  • Source Changed 0
  • Coverage Changed 0
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 29563951630
  • 42068e47 on github
  • Prev Job for on main (#29417623650.6)
  • Next Job for on main (#29584102933.)
  • Delete
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