Show clearer error message when no service is provided for a social media link [WHIT-3140]#11235
Open
Show clearer error message when no service is provided for a social media link [WHIT-3140]#11235
Conversation
TonyGDS
reviewed
Mar 11, 2026
| :invalid_social_media_link, | ||
| message: "invalid: no service provided for 'Social media account #{index + 1}'", | ||
| ) | ||
| return nil |
Contributor
There was a problem hiding this comment.
shouldn't this return false, I think it should be false for the duplicate check below as well
TonyGDS
reviewed
Mar 11, 2026
Contributor
TonyGDS
left a comment
There was a problem hiding this comment.
In the ticket it mentions "Related discussion: blank social media sections may also cause server errors and should potentially be dropped on save". Was it discussed whether to drop lines where the name and url are blank?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A user can now clearly see which service is missing, instead of blank quotes.
BEFORE:
AFTER:
JIRA: https://gov-uk.atlassian.net/browse/WHIT-3140
This application is owned by the Whitehall Experience team. Please let us know in #govuk-whitehall-experience-tech when you raise any PRs.
Follow these steps if you are doing a Rails upgrade.