message
- Error messagecode
- Error code- Supported
options
(all optional):decoratedMessage
- Eventual decorated (with ANSI styling) version of a message to be passed throught tostdout
as is
const ServerlessError = require('@serverless/utils/serverless-error');
...
new ServerlessError("Service cannot be deployed in given region", 'REGION_MISMATCH');