Skip to content

Conversation

@weebao
Copy link
Member

@weebao weebao commented Aug 24, 2025

The google callback page would load indefinitely when a user tried to save a profile with a username that already existed. This was because the frontend was not handling the error response from the backend.

This commit fixes the issue by updating the onResult and adding an onError callback to the superForm instance on the google callback page. The onResult callback now handles the failure case and displays an error message on the username field. The isSubmitting state is also reset correctly, preventing the form from hanging.

Also, updated the changelog.

The google callback page would load indefinitely when a user tried to
save a profile with a username that already existed. This was because
the frontend was not handling the error response from the backend.

This commit fixes the issue by updating the `onResult` and adding an
`onError` callback to the `superForm` instance on the google callback
page. The `onResult` callback now handles the `failure` case and
displays an error message on the username field. The `isSubmitting`
state is also reset correctly, preventing the form from hanging.

Also, updated the changelog.
Copilot AI review requested due to automatic review settings August 24, 2025 20:05
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR fixes a bug where the Google OAuth callback page would hang indefinitely when a user attempted to create a profile with an existing username. The fix ensures proper error handling and UI state management by adding error callbacks and resetting the submission state.

  • Added proper error handling for username conflicts in the Google callback form
  • Added onError callback to reset form submission state
  • Updated the changelog to document the bug fix

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
src/routes/(auth)/login/google/callback/+page.svelte Added error handling logic to prevent infinite loading and display username errors
docs/changes.md Updated changelog with the bug fix entry

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@beatcode-official beatcode-official deleted a comment from Copilot AI Aug 24, 2025
Updated the changelog to link to the pull request and to be more
concise, following the project's changelog style.
@weebao
Copy link
Member Author

weebao commented Aug 25, 2025

It doesn't work

@weebao weebao closed this Aug 25, 2025
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