Skip to content

fix: accept explicit null for optional string params instead of a 500 - #13707

Merged
ChiragAgg5k merged 2 commits into
mainfrom
fix/optional-null-params
Sep 15, 2026
Merged

ChiragAgg5k merged 2 commits into
mainfrom
fix/optional-null-params

Conversation

@ChiragAgg5k

@ChiragAgg5k ChiragAgg5k commented Sep 15, 2026 •

Copy link
Copy Markdown
Member

Summary

Fixes four Sentry issues of the same shape: a client sends an explicit null for an optional string param, utopia-http skips validation for a null optional and passes it through, and the typed action() argument throws a TypeError. The caller gets a 500 where the declared default should have applied.

Issue Endpoint Param
CLOUD-3QWQ functions.create schedule
CLOUD-3QVD executions.create path
CLOUD-3PNW, CLOUD-3QK8 account.create name

Each argument is now nullable and coalesces to its param default, the same pattern memberships.create already uses for email, userId, phone, url and name.

A framework-level fix (substitute the default for any null optional) was considered and rejected: 44 endpoints deliberately declare ?string with a non-null default and may distinguish null from the default.

Testing

Pint passes. The existing E2E create tests for functions, executions and account now also send the optional param as an explicit null and assert a 201 with the default applied. Without the fix each of those requests returns a 500 TypeError.

utopia-http skips validation for a null optional param and passes it through, so a typed action argument threw a TypeError. Coalesce to the declared default, as memberships create already does (CLOUD-3QWQ, CLOUD-3QVD, CLOUD-3PNW, CLOUD-3QK8).
@greptile-apps

greptile-apps Bot commented Sep 15, 2026

Copy link
Copy Markdown
Contributor

RetriggerConfidence Score: 5/5

The PR appears safe to merge, with localized normalization and behavioral regression coverage for all three parameters.

Summary

Accepts explicit null for three optional string parameters instead of throwing a TypeError:

  • Account creation normalizes name to an empty string.
  • Function creation normalizes schedule to an empty string.
  • Execution creation normalizes path to /.

Adds HTTP regression coverage for each case, asserting successful creation and the observable default value. No actionable issues were identified. Tests were inspected but not executed.

Reviews (1) · Last reviewed commit: "test: cover explicit null for optional s..."

@github-actions

Copy link
Copy Markdown

✨ Benchmark results

Comparing main (before) → fix/optional-null-params (after).

Metric Before After Change
🚀 Requests/sec 205.27 203.94 ⚪ -0.6%
⏱️ Latency P50 84.28 ms 86.32 ms ⚪ +2.4%
⏱️ Latency P95 199.06 ms 199.08 ms ⚪ 0%
Per-scenario breakdown & investigation details

Metrics below reflect the current branch (after). Δ P95 compares against the base.

Scenario P50 (ms) P95 (ms) Requests RPS Δ P95 (ms)
API total 86.32 199.08 12,597 203.94 +0.02
Account 154.43 289.48 663 11.22 -11.6
TablesDB 83.41 156.82 6,851 112.4 +6.64
Storage 81.72 183.85 3,315 56.46 +2.17
Functions 117.3 244.4 1,768 30.64 +0.91

Top API waits (after)

API request Max wait (ms)
storage.buckets.create 463.58
functions.create 458.96
functions.variables.update 436.28
functions.delete 424.87
account.name.update 419.42

@ChiragAgg5k
ChiragAgg5k merged commit d70a239 into main Sep 15, 2026
47 checks passed
@ChiragAgg5k
ChiragAgg5k deleted the fix/optional-null-params branch September 15, 2026 14:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants