Skip to content

Conversation

@Shooteger
Copy link
Contributor

@Shooteger Shooteger commented Oct 3, 2025

Types of changes

  • Bug fix (a non-breaking change which fixes an issue)
  • New feature (a non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Description

This PR introduces a few improvements to error handling and security validation.

Changes Made

I added URL validation with try-catch to handle malformed Supabase URLs for better DX. I added exponential backoff delays (100-300ms) between fetch retry attempts in the fetch-retry.ts utils so we have a little delay for each retry. I added a database types warning message instead of returning silently "unknown" for better DX. I extracted matchesAnyPattern helper in auth redirect to reduce code duplication (the regex check). I added the fetchWithRetry to server/service/serverSupabaseServiceRole.ts for consistency.

I am open for any changes or rollbacks on single changes, for example the types warning message or if we should set a fallback prefix, if the supabase url does not pass the check or if the fetchWithRetry was intentionally not added to the serverSupabaseServiceRole.

Checklist:

  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes (if not applicable, please state why)

@vercel
Copy link

vercel bot commented Oct 3, 2025

@Shooteger is attempting to deploy a commit to the NuxtLabs Team on Vercel.

A member of the Team first needs to authorize it.

@pkg-pr-new
Copy link

pkg-pr-new bot commented Oct 3, 2025

npm i https://pkg.pr.new/@nuxtjs/supabase@534

commit: 4ff3253

@Shooteger
Copy link
Contributor Author

@larbish

Copy link
Collaborator

@larbish larbish left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @Shooteger, LTGM

I've just moved the types folder in app directory since the new log made me realize it was not detecting it 😅

@larbish larbish merged commit 87b6c84 into nuxt-modules:main Oct 8, 2025
1 of 3 checks passed
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