EES-5824 handle alt text length error when saving data blocks #5604
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.
Currently editing data blocks that were created before the alt text character limit was added (#5497) can result in an unhandled error when the original alt text was longer than the new limit.
I've improved this by showing an error and telling users to check the Chart configuration:
![Screenshot 2025-02-13 173030](https://private-user-images.githubusercontent.com/81572860/412999779-5cd9311e-9808-499e-8169-4d2ba526f2fb.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk3MDI1MjQsIm5iZiI6MTczOTcwMjIyNCwicGF0aCI6Ii84MTU3Mjg2MC80MTI5OTk3NzktNWNkOTMxMWUtOTgwOC00OTllLTgxNjktNGQyYmE1MjZmMmZiLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTYlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjE2VDEwMzcwNFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWM4NmE1YjM3NDI5N2YwYjNlMWU5OWUzMzEyNTEwNWUyZjM2NDQzNjU2OWIyNjMwODNkODk3YzAwZWM4ZWMwYTUmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.IP57oNMjXBPgqlu38Dsoz0PSfTAP2UKQarSdY_9J4vI)
As part of this I've removed the loading spinner that would show for at least 500ms after the form was submitted as I couldn't find a way to remove it when the form errors. This hopefully won't cause any problems as we have double-submit protection on forms now and don't seem to have performance issues creating / updating data blocks. If this is a problem we may need to reconsider how to handle this error.