Inaccurate response - not valid in APEX #116
Labels
BUG P3
Owned by another team
We are maintaining this feedback for visibility but it is not within the control of our team
triaged
A work item has been created. Now being handled internally.
Summary
The response from Agentforce is invalid and incompatible with Apex. It includes Java methods like Thread.sleep, which are not available in Apex. Despite pointing out that Thread.sleep is unsupported, it still suggests using nonexistent methods like System.pause.
Steps To Reproduce:
I would like to implement a class responsible for integration with external service. It should allow to retry the logic in case of any integration error. It should retry 3 times. The fist time it should retry afer 1 minute, second time after 10 minutes and last time after 20 minutes
There is no Thread.sleep method available in APEX
Expected result
It should suggest using System.enqueueJob(new MyQueueableClass(), delayInMinutes).
First of all it should not suggest not existing methods.
Actual result
Response from Agentforce:
Next response:
System.pause(1000); // This will pause the execution for 1000 milliseconds (1 second)
Additional information
Feel free to attach a screenshot.
Salesforce Extension Version in VS Code:
Salesforce Einstein For Developers Version in VS Code:
OS and version:
VS Code version:
The text was updated successfully, but these errors were encountered: