Skip to content

Commit fb6a1a3

Browse files
authored
Merge pull request #38 from schube/master
Bugfix: Forward error code with Exception
2 parents 4a14f8b + 3813a53 commit fb6a1a3

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

FMDataAPI.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2043,7 +2043,7 @@ public function callRestAPI($params, $isAddToken, $method = 'GET', $request = nu
20432043
$description = date('Y-m-d H:i:s ') . "{$description}";
20442044
$description .= "[URL({$this->method}): {$this->url}]";
20452045
if ($errorCode !== 401) {
2046-
throw new \Exception($description);
2046+
throw new \Exception($description, $errorCode);
20472047
}
20482048
}
20492049
}

0 commit comments

Comments
 (0)