Skip to main content

Screen Shot 2020-02-13 at 14.55.50.pngI'm trying to display a friendly message on the authentication failure prompt in Zapier. Throwing an Error or HaltedError is always showing the stack trace and the console logs which I'd like to get rid of. Is there a way to only display a custom message we specify?


Make sure you test the message on an account that does not have Developer access to the app. Zapier checks the logged in user's credentials and provides additional information if your account has developer access.


What code are you currently trying to use to display the "friendly message"?



You can always catch the error in a try-catch block and remove the stack trace then throw it again. For example:

try {

// your code

} catch (error) {

error.stack = "\n"; // This should remove any stack trace from the error that is shown in the UI

throw error;

}




I'm using afterResponse where I'm validating the response status and throwing a HaltedError


if (response.status === 403) {

throw new z.errors.HaltedError('Help message here...');

}


This app is not promoted yet. I have shared access to this app by invitation and the account invited gets to see the same "What happened.. " and "Console logs: " messages. Can I remove developer access to an account invited?





You might find it easier to create a new Zapier account to test with and ask the owner of the app to invite that account. That way you don't have to keep adding then removing your regular account as a developer on the app.