Chris Messina Posted December 11, 2020 Posted December 11, 2020 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: 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.
deanishe Posted December 11, 2020 Posted December 11, 2020 Can you imagine how many workflows would break if Alfred started throwing an error every time a variable is unset or empty?
Andrew Posted December 11, 2020 Posted December 11, 2020 @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: Conditionals can also match regex if you want to get clever about the domain variable matching an expected format. Cheers, Andrew
Chris Messina Posted December 11, 2020 Author Posted December 11, 2020 8 hours ago, Andrew said: 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 Got it, thanks! Makes sense.
Chris Messina Posted December 11, 2020 Author Posted December 11, 2020 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.
Andrew Posted December 11, 2020 Posted December 11, 2020 @Chris Messina that error isn't from Alfred, it looks like it's from Finder. If the URL parses as valid, Alfred has no way of knowing what happens after it gets passed off to macOS to handle, so isn't involved in this error. It would definitely be more helpful if they showed more info - I'm sure pre Big Sur did too! Chris Messina and dfay 2
vitor Posted December 11, 2020 Posted December 11, 2020 2 hours ago, Andrew said: It would definitely be more helpful if they showed more info - I'm sure pre Big Sur did too! Can confirm. On Mojave: Andrew 1
Chris Messina Posted December 12, 2020 Author Posted December 12, 2020 OMG, that's SO much better. Sheesh.
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now