Files
supabase/apps/studio/components/interfaces/Integrations
oniani1andGildas Garcia 8f14dc6b3f fix(studio): stop cron job creation when name validation fails (#44871)
Closes #44873

When creating a new cron job, `getDatabaseCronJob` is called to check if
the name already exists. If that call throws (network error, DB
connection issue), the catch block shows an error toast but doesn't
return. Execution falls through to `upsertCronJob`, creating the job
without validating name uniqueness.

The fix adds `return` in the catch block so the mutation doesn't fire
after a failed validation check.

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

## Summary by CodeRabbit

* **Bug Fixes**
* Fixed cron job validation error handling to properly halt processing
when name validation fails and display appropriate error feedback.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->

Co-authored-by: Gildas Garcia <1122076+djhi@users.noreply.github.com>
2026-04-15 09:50:34 +02:00
..