Closed nexxome closed 5 years ago
The XML response always throws an exception on error, the JSON response doesn't. If I have multiple requests and one will fail, then the application just exits and there is no way to prevent this. If it would throw an exception instead, you can respond to it:
try {
$response = $timeModel->getByProject($projectId);
}catch (\Exception $e){
...
}
I know the user can do that but what if he doesn't? If people rely on this behavior, this looks like a breaking change to me, or?
How can anybody rely on a behavior on which you can't respond to?
good question. I will then just merge it like that and hope nobody will complain later on :D
Hi, it would be awesome if the JSON response throws an exception on other response status codes instead of exit because then you can catch it and proceed with code execution.
Thanks