diff --git a/templates/src/sfdxCommand.ts.ejs b/templates/src/sfdxCommand.ts.ejs index 1925358..bd9fc17 100644 --- a/templates/src/sfdxCommand.ts.ejs +++ b/templates/src/sfdxCommand.ts.ejs @@ -6,7 +6,7 @@ */ import * as os from 'os'; import { flags, SfdxCommand } from '@salesforce/command'; -import { Messages, SfdxError } from '@salesforce/core'; +import { Messages, SfError } from '@salesforce/core'; import { AnyJson } from '@salesforce/ts-types'; <%_ const klass = _.upperFirst(_.camelCase(commandName)) _%> @@ -64,7 +64,7 @@ export default class <%- klass %> extends SfdxCommand { // Organization will always return one result, but this is an example of throwing an error // The output and --json will automatically be handled for you. if (!result.records || result.records.length <= 0) { - throw new SfdxError(messages.getMessage('errorNoOrgResults', [this.org.getOrgId()])); + throw new SfError(messages.getMessage('errorNoOrgResults', [this.org.getOrgId()])); } // Organization always only returns one result