• Deborah Engelmeyer 4
  • NEWBIE
  • 5 Points
  • Member since 2018

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 4
    Questions
  • 4
    Replies
I am using api version 49 and throwing an AuraHandledException in Apex code that is called Imperatively from a LWC.

I have verified the exception message is set using Apex unit tests, but I consistently get a blank message in the error handling section of the LWC code.
Apex Code:
Exception ex = new AuraHandledException('');
ex.setMessage('not authorized');
throw ex;

LWC Code:
getData()
      .then((data) => {
        console.log(data);
        // processing for expected result
      })
      .catch((error) => {
        console.error(error);
        if (error.body.message === "not authorized") {
          this.error = noAmgenNewsAuth;
        } else { // error.body.message is always ''
          this.error = cannotConnect;
        }
      });

Am I missing some undocumented trick here?  Or is there a bug?
Scenario
Attempting to add a Page Layout to a managed package.
  1. Selected the package
  2. Selected Add in Components tab
  3. Selected Page Layout dropdown
  4. See full page of layouts to choose from
  5. Select "U" character link to jump to U's: nothing happens
  6. Select "Next" to see next page: nothing happens
  7. Select "More" to see more records: nothing happens
I tried this in Firefox, Chrome, and Edge.  I also tried turning off Content Blocking in Firefox.
I was finally able to see other records when I switched to Classic.
Is there a way to include files in a sfdx force:source:push, but exclude them in sfdx force:package:version:create?
I created an unlocked package using 
sfdx force:package:create

Then created a version:
 
sfdx force:package:version:create

Then tried to install, had an error and fixed it, but when I created a new version using the command above, the error was still there.  Is sfdx doing something weird like using the source in an org somewhere that I don't know about, or requiring the code to be checked in to the local repository?
I am using api version 49 and throwing an AuraHandledException in Apex code that is called Imperatively from a LWC.

I have verified the exception message is set using Apex unit tests, but I consistently get a blank message in the error handling section of the LWC code.
Apex Code:
Exception ex = new AuraHandledException('');
ex.setMessage('not authorized');
throw ex;

LWC Code:
getData()
      .then((data) => {
        console.log(data);
        // processing for expected result
      })
      .catch((error) => {
        console.error(error);
        if (error.body.message === "not authorized") {
          this.error = noAmgenNewsAuth;
        } else { // error.body.message is always ''
          this.error = cannotConnect;
        }
      });

Am I missing some undocumented trick here?  Or is there a bug?
Hi,

I'm doing the below trail to create a scratch org using the procedures and getting the below error:
ERROR:  A fatal signup error occurred. Please try again. If you still see this error, contact Salesforce Support for assistance. sfdx-project.json.

Any help would be appriciated.

https://trailhead.salesforce.com/content/learn/projects/quick-start-salesforce-dx/create-and-test-our-scratch-org

project-scratch-def:
{
    "orgName": "Dreamhouse",
    "edition": "Developer",
    "hasSampleData": "false",
    "settings": {
      "orgPreferenceSettings": {
        "s1DesktopEnabled": true,
        "selfSetPasswordInApi": true,
        "s1EncryptedStoragePref2": false
      }
    }
}

sfdx-project.json:
{
    "packageDirectories": [
        {
            "path": "force-app",
            "default": true,
            "package": "dreamhouse",
            "versionNumber": "3.0.0.NEXT",
            "versionName": "Winter '19"
        }
    ],
    "namespace": "",
    "sfdcLoginUrl": "https://login.salesforce.com",
    "sourceApiVersion": "44.0",
    "packageAliases": {
        "dreamhouse": "0Ho1I000000XZDVSA4",
        "dreamhouse@2.0.0-4": "04t1I0000036seVQAQ",
        "dreamhouse@3.0.0-5": "04t1I0000036u98QAA"
    }
}

User-added image

 
  • January 15, 2019
  • Like
  • 1