fix: remove attempt to get a more comprehensive error#7270
Closed
martinjagodic wants to merge 14 commits intomainfrom
Closed
fix: remove attempt to get a more comprehensive error#7270martinjagodic wants to merge 14 commits intomainfrom
martinjagodic wants to merge 14 commits intomainfrom
Conversation
demshy
previously approved these changes
Aug 30, 2024
Member
Author
|
The collection list view now displays the error toast, but does not load any entries if one is corrupted. A fix should be somewhere in backend.ts. |
yanthomasdev
reviewed
Apr 8, 2026
Contributor
yanthomasdev
left a comment
There was a problem hiding this comment.
One small nit from me
Comment on lines
+634
to
+645
| response.errors?.forEach(error => { | ||
| dispatch( | ||
| addNotification({ | ||
| message: { | ||
| details: error, | ||
| key: 'ui.toast.duplicateFrontmatterKey', | ||
| }, | ||
| type: 'warning', | ||
| dismissAfter: 8000, | ||
| }), | ||
| ); | ||
| }); |
Contributor
There was a problem hiding this comment.
My only worry is if there's a ton of errors at one time. Maybe we should aggregate it?
Also, the key is ui.toast.duplicateFrontmatterKey, but from what I understood the code will also catch other types of parsing issues, so maybe the name should be more generic? Like ui.toast.entryParseErrors
Suggested change
| response.errors?.forEach(error => { | |
| dispatch( | |
| addNotification({ | |
| message: { | |
| details: error, | |
| key: 'ui.toast.duplicateFrontmatterKey', | |
| }, | |
| type: 'warning', | |
| dismissAfter: 8000, | |
| }), | |
| ); | |
| }); | |
| if (response.errors?.length) { | |
| dispatch(addNotification({ | |
| message: { | |
| details: response.errors.join('\n'), | |
| key: 'ui.toast.entryParseErrors', | |
| }, | |
| type: 'warning', | |
| dismissAfter: 8000, | |
| })); | |
| } |
Member
Author
|
closing as this is fixed in #7679 |
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.
Closes #7262
attemptwas used to better handle the function, but it obtused the error so it was not clear which frontamtter field was duplicated.