Commit ef36af9b authored by David Paul's avatar David Paul
Browse files

Improve error catching to prevent silent errors

parent 4dc87546
......@@ -86,13 +86,12 @@ $sourcedid = htmlspecialchars($sourcedid);
$operation = 'replaceResultRequest';
$postBody = str_replace(
array('SOURCEDID', 'GRADE', 'OPERATION','MESSAGE'),
array($sourcedid, $grade, $operation, uniqid()),
array('SOURCEDID', 'GRADE', 'OPERATION','MESSAGE'),
array($sourcedid, $grade, $operation, uniqid()),
getPOXGradeRequest());
$response = sendOAuthBodyPOST($method, $endpoint, $oauth_consumer_key, $oauth_consumer_secret, $content_type, $postBody);
try {
try {
$response = sendOAuthBodyPOST($method, $endpoint, $oauth_consumer_key, $oauth_consumer_secret, $content_type, $postBody);
$retVal = parseResponse($response);
} catch(Exception $e) {
echo json_encode(Array("status" => "failure", "detail" => $e->getMessage(), "response" => $response));
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment