Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(ui): resolve Zod schema parsing issue on domain transfer #1688

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

unrenamed
Copy link
Contributor

What does this PR do?

Fixes #1674.

Root Cause

Domain Zod schema is parsing a Prisma update response that don't have a required field: registeredDomain (it can be null, but not undefined). And it does that after updating the DB and adding a record to QStash, thus returning an error but proceeding to complete the transfer (eventually sending a success email).

This issue seems to be common for both verified and unverified domains.

Fix

For consistency with other domain operations like delete, I kept the Prisma response parsing and included registeredDomain entity into the response using Prisma's include option.

Also, this PR fixes a typo in the domain transfer error message. Looks like it was copied from the domain delete API route.

How to test?

  1. Log into the application and create a new workspace if you only have one.
  2. Navigate to your main workspace domain management: Settings > Domains
  3. If you don't have a domain, add a new one.
  4. Transfer an unverified domain to a different workspace.
  5. You should see a toast with a success message.

Copy link

vercel bot commented Oct 30, 2024

@unrenamed is attempting to deploy a commit to the Dub Team on Vercel.

A member of the Team first needs to authorize it.

@unrenamed
Copy link
Contributor Author

@steven-tey This one is ready for peer review

@unrenamed
Copy link
Contributor Author

unrenamed commented Oct 31, 2024

@steven-tey @TWilson023 just in case this slipped through, I'd highly appreciate it if you review and merge (if all is good) this and #1687 before the end of the event.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Unverified Domain Transfer Shows Validation Error but Completes in Background
1 participant