Jump to content

Calling an non-existing External Trigger should error out [Fixed 3.4 b832 pre-release]


vitor
 Share

Recommended Posts

If when calling an External Trigger we input information that does not exist (does not matter if it’s the run trigger or the in workflow part), the command will do nothing but still exit with an error code of 0.

 

Alfred should either show an error message or give a non-0 exit code.

Link to comment
Share on other sites

I was thinking of a dialog, since that is consistent with what AppleScript tends to do on errors of missing apps.

 

But a non-0 exit code is the most important part, as it allows us as Workflow developers to act appropriately. For instance, I have a Workflow that lets you stream short films and recently thought it’d be nice if I could just download the videos directly (since that’s what I often do, as a multi-step process). Instead of duplicating functionality, I just pipe the URL to a Workflow that downloads videos and let it handle it.
 

However, if the user does not have the latter, nothing will happen. Instead, I should detect that is the case and act appropriately (i.e. tell them why nothing happened and how to fix it).

Link to comment
Share on other sites

@vitor Ah sorry, I thought you were talking about the "Call External" output. Yep, I can see that there is no errors being output when the External Trigger AppleScript is run on Alfred.

 

I've added the following errors into the External Trigger AppleScript for the next release:

Unknown Error: -1
Workflow Not Found: -2
Trigger Not Found: -3
Workflow Disabled: -4

Cheers,

Andrew

Link to comment
Share on other sites

  • Andrew changed the title to Calling an non-existing External Trigger should error out [Fixed 3.4 b832 pre-release]

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
 Share

×
×
  • Create New...