You can use SSL mutual authentication, where the endpoint can verify the certificate used, or you could use an IP address white list using the published IP address ranges for Salesforce. Both of threat techniques can be used to verify that a request is authentic.
This error happens if your firewall doesn’t allow access to your server where the web service is hosted. Making the firewall changes should fix this issue.
In general, when you see an issue, follow this checklist to troubleshoot the issue:
Make sure you have the firewall settings in your enterprise is configured to allow the inbound web service call.
As you are declaring endpoint directly in class String endPoint = 'callout:SFDC_SRC/services/apexrest/v1/getAccounts/';, you are getting invalid session Id error. Refer to this document: (Holds true for lightning - Aura or LWC)
By security policy, sessions created by Lightning components aren’t
enabled for API access. This restriction prevents even your ...
That is a possible way to bypass SF limits:
1) Make a callout to your server (do not wait for result).
2) On your server, after all calculations and any other actions make a callout to SF @RestResource with the actual answer.
3) Process answer on SF side.
Also sfdcfox is right, you can move logic dealing with duplicates to SF side by creating duplicate ...
I think this solution is very unlikely to work. For one thing, you're going to break all of your unit test classes in a scratch org context, or else build complicated mocks or conditional logic to supply this data to your unit tests.
Instead, I'd recommend working on build automation that will seed your scratch orgs with a standardized data set sourced from ...
The problem is that you are trying to set a body on a GET request, which is not normal. There's some discussion on the subject of whether or not a body is allowed in a GET request, but the simple advice is not to do it.
any HTTP request message is allowed to contain a message body, and
thus must parse messages with that in mind. Server semantics for GET,...