Skip to content

Commit 8dd6084

Browse files
committed
Add 403 check. Cleanup debug
1 parent 85b82d5 commit 8dd6084

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

Basecamp.class.php

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -621,12 +621,15 @@ function _makeAuthenticatedRequest($resource,$params=array(),$method='GET',$head
621621

622622
if ( $http_code == 401 ) {
623623
$response = json_encode(array('error_code'=>401,'error'=>'Unauthorized Access'));
624-
}
624+
} elseif ( $http_code == 403 ) {
625+
$response = json_encode(array('error_code'=>403,'error'=>'Forbidden'));
626+
}
625627

626628
if ( $this->debug ) {
627629
print_r(curl_getinfo($ch));
628-
print $header;
629-
print $response;
630+
print "Header: $header\n";
631+
print "Params: ".print_r($params,1);
632+
print "Response: $response\n";
630633
}
631634

632635
if ( $returnRawResponse ) return $response;

0 commit comments

Comments
 (0)