Get Asset Error messages

Easy one …

Can you change the Get Asset error message to include the name of the asset it’s trying to request …?

At the moment it just says “Could not find an asset with this name” which means you need to log each asset value to debug which asset has failed.

Thanks,

R2D2

@richarddenton: Can’t help but notice your signature “R2D2”

If we are logging and naming the activities, we will know which activity is throwing the error and narrow down the asset name, right? Still I would like to know the asset name when the error is thrown.

I don’t believe that even naming the Get Asset activity gives you this information. Possibly at trace level but I don’t want to have to log every asset value (as much as I love logging!)

@Andrei_Cioboata wouldn’t be happy with me! :smiley:

1 Like

Hi,

What happens if you put your Get Asset activity into a Try Catch scope and add a write line to the exception part, writing exception.Message + vbnewline + exception.Data.ToString in it? I am not sure if it helps, but maybe…

1 Like

Hmm yeah that could work in principle but it’s a bit clunky having to have every get asset activity in a Try Catch. Some processes have 20 odd assets.

Here’s my input.

I agree more details are a good thing. I feel like this doesn’t need to be limited to only Get Asset though, because you would essentially be outputting which variable or the value in the variable that caused the error, which could be useful with basically every activity.

Yeah, you don’t always have the luxury of good logging and a well-organized framework model for your process. But on the other hand, using good practices like simply naming your activities will identify the location of the error pretty quickly. Like, for example, naming it “Get Credentials - Email” will show that activity name when an error occurs if you are testing a workflow individually. Then, you would also want to work from a Main where initialization occurs within an Invoked workflow that is surrounded by a Try/Catch that captures the exception.Source, and that is something you would need to do anyway if you want to get which activity threw the exception.

Thanks.