I have tried using both of the below
1) throw new ApplicationError('Custom error message')
2) throw new utils.errors.ApplicationError('Custom error message');
but it didn’t workout for me in version v4.9.0.
The admin UI displays Internal server error popup message while in the terminal it displays ApplicationError: Custom error message.
Am I doing something wrong here?