laravel / forge-sdk

The official Laravel Forge PHP SDK.
https://forge.laravel.com
MIT License
528 stars 89 forks source link

Ensure timout exception always recieves an array #143

Closed timacdonald closed 2 years ago

timacdonald commented 2 years ago

fixes #142

reverts changes made in #111

This PR fixes the potential types received by the TimeoutException.

Currently we don't restrict the value returned by the retry closure, thus anything can be returned. Throughout the project we return null and false in differing situations. Although type analysis would get this sorted for us, I've opted to just address this by preparing the data before sending the the exception.

Note that this reverts the changes made here in https://github.com/laravel/forge-sdk/issues/109 to deal with the bad data closer to it's point of creation an not pass down further into the system.