You need to sign in to do that
Don't have an account?
Marin Zaimov
Creating a REST API errors and debugging - An unexpected error occurred. Please include this ErrorId if you contact support:
Hi guys,
I am creating my own REST API.
I was able to succesfully do @HttpPost
I am now working on @HttpGet and getting the following error from my curl request:
[][{"message":"An unexpected error occurred. Please include this ErrorId if you contact support: 22838684-12976 (2061038835)","errorCode":"UNKNOWN_EXCEPTION"}]
What does this mean and how can you guys use it to help me get my API running?
Also, how can i test and debug my Web service without having to contact support every time?
Here is my curl command:
curl --request GET -H 'Authorization: OAuth 00Do0000000KyIg!ASAAQAUD3IsQkLkjFArVq6RvMadk41WNticN9ZgGHa7Iozs0euGa9XVG7LMEysX6C_SIVcCNrr4NA5a62k2lrGgNTLtyXepJ' 'https://na17.salesforce.com/services/apexrest/QuotePreview?quoteId=a0Fo00000026dOXEAY'
and Php code used to run a get:
$quoteId = 'a0Fo00000026dOXEAY';
$quoteurl = "https://na17.salesforce.com/services/apexrest/QuotePreview?quoteId=".$quoteId;
$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, $quoteurl);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
curl_setopt($curl, CURLOPT_HTTPHEADER,
array("Authorization: Bearer $accessCode",
"Content-type: application/json"));
curl_setopt($curl, CURLOPT_HTTPGET, true);
$json_response = curl_exec($curl);
I am creating my own REST API.
I was able to succesfully do @HttpPost
I am now working on @HttpGet and getting the following error from my curl request:
[][{"message":"An unexpected error occurred. Please include this ErrorId if you contact support: 22838684-12976 (2061038835)","errorCode":"UNKNOWN_EXCEPTION"}]
What does this mean and how can you guys use it to help me get my API running?
Also, how can i test and debug my Web service without having to contact support every time?
Here is my curl command:
curl --request GET -H 'Authorization: OAuth 00Do0000000KyIg!ASAAQAUD3IsQkLkjFArVq6RvMadk41WNticN9ZgGHa7Iozs0euGa9XVG7LMEysX6C_SIVcCNrr4NA5a62k2lrGgNTLtyXepJ' 'https://na17.salesforce.com/services/apexrest/QuotePreview?quoteId=a0Fo00000026dOXEAY'
and Php code used to run a get:
$quoteId = 'a0Fo00000026dOXEAY';
$quoteurl = "https://na17.salesforce.com/services/apexrest/QuotePreview?quoteId=".$quoteId;
$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, $quoteurl);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
curl_setopt($curl, CURLOPT_HTTPHEADER,
array("Authorization: Bearer $accessCode",
"Content-type: application/json"));
curl_setopt($curl, CURLOPT_HTTPGET, true);
$json_response = curl_exec($curl);
Is there an Error Id, which you have received in a EMAIL by Salesforce. ?
Regards
Pramod