-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The problem in catching exceptions #1274
Comments
it looks like the ResponseTrait::format / ResponseTrait::respond failed to handle the response correctly could you provide/post the array you use in the response function call - its pretty hard to understand the callstack without any data |
Yes, please provide additional details on how to recreate. I'm having a hard time following this one. |
I can't fully reproduce the bug, but here’s another one that got
and we see an error here again as you can see the first error returns us -> 403 Forbidden
|
This is indeed hard to follow. |
There is a todo item a few entries down in the issues list that suggests that CURL needs some helpers, eg. for JSON. Is this evidence of such a lack? |
Is the $is_install defined? Try: $options = [
'base_uri' => 'you.com', // need returned error: 403 Forbidden
'timeout' => 1,
'http_errors' => false, // This avoids an exception thrown if the HTTP code is is greater than or equal to 400
];
$client = \Config\Services::curlrequest($options); |
It looks like this is happening inside application/Modules/Globals/Module/func.php and/or application/API/v1/System/Upload.php, and I can't follow how this is a CodeIgniter bug. |
Managed to reproduce this issue. Was uploading an image with jquery.dm-uploader.min.js, and trying to do some image manipulation, but when I got this error: Then I was basically getting the same response as the OP. Note: I managed to get the real exception by printing in in the FormatException.php file |
The problem occurs when you create a global variable with an object of any class, except that it handles the variables only to an array, but when it receives an exception in the global variable, it throws an internal error.
It is easy to see that first the exception is normally worked out, and then it is covered by a mistake from the exception itself, and in this case the error is only visible in the log
Sorry for Google translator from Russian
The text was updated successfully, but these errors were encountered: