Closed khalyomede closed 4 months ago
could you kindly provide code/tests in order to replicate this?
Could you provide the Line of Code where this issue arises?
I could imagine this was a Guzzle Http Exception notifing, that the requestet resource was somewhere else with a Redirect Header (which we could ignore for now if we still get the correct result)
My report tool mention this line that cause the unhandled exception
https://github.com/openfoodfacts/openfoodfacts-php/blob/0.2.4/src/Api.php#L416
I noticed this is not part of the develop branch anymore, I guess it should be cleaned in future versions right?
To answer you @epalmans I am not able to always reproduce it, my code (called through openfoodfact-laravel) just speaks with this package when I search for a product from a bar code, nothing fancy).
The trigger_error has been removed, no more error is triggered (only warning log). I close the issues
Story
My error reporter reported this error, and when I read the source code I did not understood what is the root cause of this error. No comment explains this case, and at the end I do not how to handle this error: should I consider it a failure after scanning a bar code? Should I try again? If yes, how many time before I should abandon retrying?
Part of