+ Start a Discussion
Flight PlanFlight Plan 

System.UnexpectedException: Salesforce System Error: 481906057-15173 (136853240) (136853240)

Hi ,


I am receving this error when I am executing the test class and It was showing at

response = http.send(request);

Anyone tell me the exact cause of the issue or I am missing something.


I am using MultiStaticResourceCalloutMock in my test classes to test the callouts.





In my case, I was getting this error when I didn't specify the EXACT endpoint fully (including query params):


FATAL_ERROR|System.NullPointerException: Static Resource not found: <null>


So doing this wasn't correct:

multimock.setStaticResource('https://api.blah.com/contact', 'CreateContactSuccess');


But this fixed that:

multimock.setStaticResource('https://api.blah.com/contact?accountid=1234', 'CreateContactSuccess');


The error you are receiving might be something equally meticulous involving the MultiStaticResourceCalloutMock syntax.


If you're extracting values from your response and storing them in variables, you might be able to build the endpoint string using those, instead of have all knowing knowledge ahead of time to hardcode these things.


Best of luck! And...


May The SForce Be With You!