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

Template Processing Fails Silently for Unknown Functions #815

Open
simone-viozzi opened this issue Mar 17, 2024 · 0 comments
Open

Template Processing Fails Silently for Unknown Functions #815

simone-viozzi opened this issue Mar 17, 2024 · 0 comments
Labels
bug Something isn't working good first issue Good for newcomers

Comments

@simone-viozzi
Copy link

I encountered an issue where template processing fails silently in the UI when using unknown functions, with errors only being visible in the browser's developer console. This behavior can be misleading, as it does not provide immediate and clear feedback on what went wrong.

Steps to Reproduce:

  1. Create a template that includes a call to an unknown function, e.g., {{dateAdd(today, 1, "days")}}.
  2. Use the template within SilverBullet.
  3. No error is shown in the SilverBullet UI or logs in docker, but an error appears in the browser's developer console.

Expected Behavior:

I would expect an error message to be shown in the SilverBullet UI or at least be logged in a more accessible manner, informing the user that the template processing failed due to the use of an unknown function.

Actual Behavior:

The template processing fails silently without any clear feedback in the UI. An error message is only visible in the browser's developer console: An exception was thrown as a result of invoking function insertSnippetTemplate error: Unknown function: dateAdd.

Additional Context:

This issue was discovered while trying to create a template for setting a due date as "due tomorrow" using an unrecognized function dateAdd. The lack of feedback made it difficult to identify the issue initially.

---
tags: template
description: "Due tomorrow"
hooks.snippet.slashCommand: dueTomorrow
---
[due: {{dateAdd(today, 1, "days")}}]
@zefhemel zefhemel added bug Something isn't working good first issue Good for newcomers labels Mar 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants