Questions tagged [calloutexception]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
0 answers
14 views

Get Presigned URL using named credentials

I successfully obtained the pre-signed URL to upload large file to aws s3 bucket using the method described in the article https://mtr-design.com/news/how-to-create-a-presigned-url-for-aws-s3-using-...
Mohamed Ashfak's user avatar
0 votes
0 answers
588 views

Named callout Null in http request with named credential - What would cause it?

I am making a callout and getting the error "System.CalloutException: The callout couldn't access the endpoint. You might not have the required permissions, or the named credential "XXX"...
Pauline's user avatar
  • 375
0 votes
0 answers
38 views

Summer 22 Schedulable Test System.CalloutException

I don't quite know how to explain the behavior we're seeing. I have two test methods that test exactly the same thing (same inputs, same assertions). The only difference is that one schedules the job, ...
Mike's user avatar
  • 1,189
2 votes
1 answer
989 views

Platform Event + Flow + Apex Action not behaving as a separate transaction sometimes

As we have used Async operations (Future and Queueable) very heavily in our codebase. Thus for doing callouts from trigger, I started using Platform Events + Flow. So from Trigger a PE will be raised :...
Nagendra Singh's user avatar
1 vote
1 answer
4k views

Named Credential Permission Error - How to enable named credentials with "Named Principal"

I've got a new named credential setup using an OIDC auth provider and the named principal type. It's authenticated successfully but when I try to call it I get String namedCredential = 'callout:asdf'; ...
Ralph Callaway's user avatar
0 votes
1 answer
135 views

When callout is made inside a Post-Install script, it fails with uncommitted work pending

When callout is made inside a Post-Install script, it fails with the error You have uncommitted work pending. Please commit or rollback before calling out If we run the method Limits....
Patlatus's user avatar
  • 16.4k
1 vote
1 answer
3k views

Apex callout Unable to tunnel through proxy. 403 forbidden. Using Named Credentials; works fine in curl

Given: Apex Callout (POST) to an in-house REST service Named credentials Authorization headers are correct URL is correct Verified working using curl When: Invoked using execute anonymous or ...
cropredy's user avatar
  • 70.9k
0 votes
0 answers
68 views

"You have uncommited work pending" when there's no obvious DML?

I have a RestResource which is running some callouts, as well as running some DML (after the callouts). I'm recieving this error: You have uncommited work pending. Please commit or rollback before ...
Jessica's user avatar
  • 155
0 votes
2 answers
760 views

HTTP Callout after async DML

I'm trying to do HTTP callout after DML in future method, but I'm getting System.CalloutException: You have uncommitted work pending. Please commit or rollback before calling out. What I'm missing? Is ...
edelrabe's user avatar
  • 779
1 vote
1 answer
1k views

Need to specify full name, Current Name: Id, Required Delimiter

In the below code I am trying to Assign Object and field permissions using metadata API. When I run the below apex class and trying to assign read permission on the field, I am running in to below ...
vara's user avatar
  • 75
0 votes
0 answers
2k views

Unexpected end of file from server

after sending http request from the anonymous apex HttpRequest httpRequest = new HttpRequest(); httpRequest.setHeader('Content-Type', 'application/json'); httpRequest.setHeader('Content-Length', '...
SFguru's user avatar
  • 25
2 votes
3 answers
2k views

System.CalloutException: Script-thrown exception from HTTP class

I am need some help. I create one integration to ERP and before yesterday the integration working fine. But yesterday it's fail and the stack trace give me this information: I think it's because the ...
Elivelton Walter's user avatar
0 votes
1 answer
743 views

System.CalloutException when making Apex Callout

I have a Apex Callout like bellow which calls the external System API with OAuth2. I am trying to use the Access token if it hasnt expired and generate one if it is expired and store into a encrypted ...
user81642's user avatar
  • 667
1 vote
1 answer
116 views

What is the reason behind uncommitted work pending issue in the callout?

I am getting uncommitted work pending issue in my test class but Limits.getDMLStatements() says there are 0 DML performed before and after callout. What else could cause this issue? Code is ...
Sushant Srivastava's user avatar
0 votes
1 answer
104 views

Batch callout error: Call out made it firstbefore DML

I have review similar questions, and all of them mention to do API before any DML similar question 1 and similar question 2 However, I am trying to do the API in the excecute, and I am still getting ...
manza's user avatar
  • 1,953
0 votes
0 answers
38 views

Getting Error: System.CalloutException: You have uncommitted work pending. Please commit or rollback before calling out [duplicate]

I'm getting the Error stated in the title above in my code. The method is run in a flow that passes a newly created opportunity id to it. Here's the code: global class NewOppUTS { @InvocableMethod(...
Nathan Borton's user avatar
1 vote
1 answer
2k views

The following exception has occurred: IO Exception: Unable to tunnel through proxy. Proxy returns "HTTP/1.1 503 Service Unavailable"

We have a batchable Apex job (process) where we call an external web service for some Accounts. It starts and service is called. Then, for some records it we get the error : Unable to tunnel through ...
Giorgos Galaios's user avatar
1 vote
0 answers
813 views

Web service callout failed: WebService returned a SOAP Fault: System.Web.Services.Protocols.SoapException: Server was unable to process request

I am new to Integration Projects. I have an Apex class generated from the WSDL of a third party. I would like to utilize the methods of that Apex class and write a batch class that utilizes the ...
user64977's user avatar
0 votes
1 answer
115 views

When method called 2 times: Uncommitted work pending. please commit or rollback before calling out

I have a method: public static CreateUpdateAPI (Account acc) { //do WS callout //perform DML } When i call it from Anonymous console with one Account it runs properly. But when i call the ...
Giorgos Galaios's user avatar
2 votes
1 answer
854 views

Unauthorized endpoint when calling Metadata API from Apex in @future

I am running into the exception IO Exception: Unauthorized endpoint, please check Setup->Security->Remote site settings. endpoint = https://eu25.salesforce.com/services/Soap/m/42.0 when ...
Robert Sösemann's user avatar
3 votes
0 answers
385 views

In a test class example of a Post Install script, sending an email and scheduling a class that performs an API callout

Scenario: In my example, as a part of the PostInstall (class implements InstallHandler) script I will be performing two actions; - sending an email to the installing User for the express purpose of ...
JetSparx's user avatar
  • 159
1 vote
0 answers
59 views

HTTP CalloutException in Summer '19 sandboxes

Yesterday I started experiencing intermittent but frequent errors with HTTP callouts using Named Credentials in Apex in multiple sandboxes (all Summer '19 preview instances). These same callouts had ...
Matthew Souther's user avatar
1 vote
0 answers
280 views

Why is this a Callout loop?

When a customer buys my app from AppExchange, Salesforce creates a new Lead in my Partner Business Org (PBO), with lead source set to "Package Install". When that happens, I have written automation to ...
PatMcClellan__c's user avatar
0 votes
2 answers
1k views

Yahoo API callout failing

Below code was working fine few days back. Suddenly stopped working and throws error. String endPoint = 'https://query.yahooapis.com/v1/public/yql?q='; String queryUrl = 'select item.condition from ...
Reshma's user avatar
  • 4,009
0 votes
0 answers
583 views

@future method not getting called from catch block

I am calling a webservice (synchronous) and in case of CalloutException, I'm trying to create an error log in a custom object. The problem is, the record insertion is happening in a future method and ...
pk1772's user avatar
  • 133
5 votes
3 answers
2k views

Confused by CalloutException

I have a trigger on Account and Opportunity - both do a callout to the Google Geocoding API and then update itself using a future method. Now I also want to send an email before the update if certain ...
Semmel's user avatar
  • 2,342
3 votes
1 answer
3k views

Issue while uploading file greater than 5MB

I am trying to upload a file in salesforce and send it to Sharepoint for storage using synchronous call. However, when i upload file more than 5MB i am encountering an issue like below :' {FAILURE=...
user47646's user avatar
1 vote
0 answers
7k views

Anyone familiar with 'no protocol' CalloutException message, and addressing it?

I'm working a process involving third-party webservices, and have made it past the initial authorization hurdle but am running into a new problem. Regardless of whether the content-type is specified, ...
Duncan Stewart's user avatar