I am running Active Collab 5.8.7 with PHP 5.6. I am using the API to create a Company and User. The API works but if there are any errors, the errors do not bubble up to the calling PHP script. I am using the approach outlined here.
try {
$client->post('projects/65/tasks', [
'name' => 'This is a task name',
'assignee_id' => 48
]);
} catch(AppException $e) {
print $e->getMessage() . '<br><br>';
// var_dump($e->getServerResponse()); (need more info?)
}
The only way I can catch errors is by turning on debugging in Active Collab config.php
and watching the log file. For instance, in the above example, the task_list_id
is missing but it is required. I didn't figure that out until I looked in the log. I would expect that error to bubble up so I can catch it in my script.
Does anyone know how to make these errors bubble up?