I think you can `throw` your own SuiteScript Error...
# suitescript
e
I think you can
throw
your own SuiteScript Error using either
nlapiCreateError
or
N/error.create
, make sure your call is configured to send the appropriate notification email, then just
catch
it yourself and write whatever you want to the response.