question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Exception in SendEmail activity when using Liquid expression in mail body

See original GitHub issue

Hi,

I’m trying to evaluate Elsa workflow in a new project and i’m creating a POC following the document approval sample.

I’m building the workflow using the visual designer but when invoking it from postman, I receive the below error:

{
    "errorMessage": "Workflow faulted at 2021-08-24T08:22:35Z with error: An exception was thrown whilst setting 'SendEmail.Body'. See the inner exception for further details.",
    "workflow": {
        "name": null,
        "version": 15,
        "instanceId": "59f096ad0dca456bb3a7ce6c8dd2399a"
    }
}

After some digging, I found the error happens if I added this part to the email body: <a href="{{ "Approve" | signal_url }}">

but when I remove it, everything works fine.

So, I’ve two questions:

  1. Why this issue happen?
  2. Where can I find the detailed exception logs so I can check the inner exception?

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:14 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
sfmskywalkercommented, Aug 26, 2021

I just realized I didn’t try the workflow designer part yet. That part is still broken for me, so I will update the sample + guide as necessary.

0reactions
sfmskywalkercommented, Aug 26, 2021

Great!

One more question please, let’s say I’ve hosted the server on IIS and this exception happened, where exception logs can be found in that case?

It depends on the log provider you install with your application. The Elsa sample projects only use the Console provider, but you can configure others, like EventSource, EventLog, Application Insights, and more. You can also use SeriLog as the logging provider, which makes it easy to write log entries to files on disk. Here’s a brief blog post that describes configuring SeriLog to log to files for ASP.NET Core.

I suggest to add a configuration to enable/disable returning the whole exception details in the response…It’ll be very helpful in troubleshooting production issues.

That’s a great suggestion. Thank you.

Read more comments on GitHub >

github_iconTop Results From Across the Web

can't access variables inside the liquid templates #3195
Hi, I am trying to access workflow variables inside the liquid templates within workflow designer but any attempt to access variables throws ...
Read more >
Elsa 2 - HTTP Response not working in this case · Issue #955
The error is : System.ArgumentNullException: 'Value cannot be null. (Parameter 'baseUri')' in "Elsa.Activities.Http". This is the code in the ...
Read more >
Send mail in custom hook in directus 9 not working
I check by removing it, then i get an error that the template is missing. /extensions/hooks/event-time-update/index.js module.exports = function ...
Read more >
Exception handling for SendEmailNotification activity
PRRuntimeException: Caught unhandled exception : Unable to send email due to : 250 2.0.0 x5R5ANsP012515 Message accepted for delivery .
Read more >
How to get actual error message of Scope in Logic App
After trigger and Initializing variables have been added couple of actions in the Try scope, following it is the Catch Exception scope in...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found