Jump to content

Missing variable leads to generic error message when executing List Filter option


Recommended Posts

I ended up triggering a generic error that wasn't too helpful when I actioned a List Filter item whose output was an "OpenURL" object with a variable that I'd forgotten to add to the Workflow:

210079782_CleanShot2020-12-10at16_19.31@2x.png.c9de8a46f80c251ba08cf7fc4b624934.png

Not sure if Alfred could have caught this, but if it had said something like "Variable [variableName] isn't set." or something, that might be more useful?

 

Basically the problem was that {var:domain} hadn't been set in the Workflow. I'm not sure if I got the error because the variable wasn't set or that the arg was invalid when it was passed to the Open URL object.

 

159735951_CleanShot2020-12-10at16_35.00@2x.thumb.png.f667b379a10751612a0ffbf5623e5aa7.png

Link to comment

@Chris Messina An unset or empty variable is also a perfectly valid state, and Alfred can't guess what you want in your specific case.

 

One option you could do if you rely on that variable is add a conditional utility, and check if that variable is set or not, and post a notification if it's not in a state you expect. It would look something like this:

 

Screenshot 2020-12-11 at 09.08.24.png

 

Screenshot 2020-12-11 at 09.10.48.png

 

Conditionals can also match regex if you want to get clever about the domain variable matching an expected format.

 

Cheers,

Andrew

Link to comment
9 hours ago, deanishe said:

Can you imagine how many workflows would break if Alfred started throwing an error every time a variable is unset or empty?

 

Totally. That's not what I'm talking about; only point out that the error message seems more vague than it could be, but perhaps it's not possible to get any more specific.

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...