function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Tania B GarciaTania B Garcia 

Apex Test error mensaje System.AuraHandledException: Script-thrown exception

Hi
I have the following apex test that I did,
User-added image
when executing it in a sandbox environment it gives me coverage of 78%, the next thing is to migrate it to another sandbox where QA tests are done, but when migrating it with the change set and doing the validation, the following message appears error
User-added imageI already checked the line that says the error and I do not see anything wrong, this is the part of the code that is mentioned in the error
User-added imageCould you help me to know what is wrong in the change set, because in the end I can not pass it to the other sandbox and I think the same will happen when I migrate it to production

Thanks and Regards










 
Best Answer chosen by Tania B Garcia
Suraj Tripathi 47Suraj Tripathi 47

Hi Tania,

I think there is no data inside the string sentBancompara so please check first  string is the return type of SFObjectPostAsyn

Please try to write the test class for SFObjectPostAsyn this method also

If your query is solved please mark it as the Best Answer

Thank You