feat(ui): show ⍰ as default value in case of missing variables in mustache templates #361
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.
Motivation
while developing and testing with Zeebe, the PostgreSQL DB sometimes is out of synch and makes Simple Monitor fall flat,
during rendering the mustache template. This includes the custom /error page, which is still a white page, even with all exception handlers in place.
This PR simply places a ⍰ character as default, so rendering passes through and just the special character is placed,
where the missing variable was used. This can look like this:
I know this default value violates a bit the "fail fast" principle.
But I found it more annoying to analyze broken HTML/screenshots and search for exceptions in the log.
E.g. recently a field 'elementId' was not populated ... and its used multiple times - so the hunt for the broken template did start :/
This approach seems to be more indicative that some data might be corrupt - since this is a typical replacement character. .
So in summary I consider this default/replacement value a better solution over fail fast.
Any feedback is welcome.