Skip to content

Http:retry(...) does not retry request when throw param is set to false #41601

@Cintrust

Description

@Cintrust
  • Laravel Version: 9.2.0
  • PHP Version: 8.1.0
  • Database Driver & Version: MSQL v8.0.27

Description:

Calling Http::retry(3, 100, function(){return true} ,throw: false)->post(...); does not retry the request but returns the response of the first attempt.

Steps To Reproduce:

run php artisan tinker and paste the following code.
or just paste it inside any controller

$response = Http::retry(3, 100,function($e){
 report($e);
return true;
},   false)->post("https://sandbox.monnify.com/api/v2/bank-transfer/reserved-accounts");

check logs. No error would be reported

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions