Skip to content
Snippets Groups Projects
Commit ef36af9b authored by David Paul's avatar David Paul
Browse files

Improve error catching to prevent silent errors

parent 4dc87546
Branches
No related tags found
No related merge requests found
...@@ -90,9 +90,8 @@ $postBody = str_replace( ...@@ -90,9 +90,8 @@ $postBody = str_replace(
array($sourcedid, $grade, $operation, uniqid()), array($sourcedid, $grade, $operation, uniqid()),
getPOXGradeRequest()); 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); $retVal = parseResponse($response);
} catch(Exception $e) { } catch(Exception $e) {
echo json_encode(Array("status" => "failure", "detail" => $e->getMessage(), "response" => $response)); echo json_encode(Array("status" => "failure", "detail" => $e->getMessage(), "response" => $response));
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment