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

Resolve unexpected end of JSON input error #451

Merged
merged 2 commits into from
Jan 27, 2025
Merged

Conversation

daniellemaxwell
Copy link
Contributor

This PR removes a return statement that led to a JSON error. The error caused an error alert to appear in the Endeavor form that was unrelated to the form submission. It should be noted that form data is sent successfully, but the error message appears below the confirmation message which could lead to user confusion.

@@ -68,7 +68,6 @@ form?.addEventListener('submit', async (event) => {
contactAlert.style.display = 'none';
}, 5000);
}
return response.json();
Copy link
Contributor Author

Choose a reason for hiding this comment

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

No data is returned from the BE if a form submission is successful and this caused an unexpected end of JSON input error to be caught in the catch block.

@rebeccabilbro rebeccabilbro self-requested a review January 27, 2025 17:09
Copy link
Member

@rebeccabilbro rebeccabilbro left a comment

Choose a reason for hiding this comment

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

lgtm

@daniellemaxwell daniellemaxwell merged commit ed20556 into main Jan 27, 2025
1 check passed
@daniellemaxwell daniellemaxwell deleted the sc-29296/error-msg branch January 27, 2025 19:09
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