Please correct me if I am wrong, but having error codes preserved, one could check if updating proxy options (i.e. using a new TOR identity) helps. That's exactly my case right now. Could do a pull-request if my proposal is approved.
Agreed. Currently the error code is only present in the error message itself. I can add it quickly but send a PR if you already have the patch, would be nice to grow the list of contributors 👍🏼
Here:
https://github.com/Stichoza/google-translate-php/blob/a4cb6e279810e29eee2ad09f2356a60d27afe3bd/src/GoogleTranslate.php#L311
the error codes 503/429/413 are omitted.
Please correct me if I am wrong, but having error codes preserved, one could check if updating proxy options (i.e. using a new TOR identity) helps. That's exactly my case right now. Could do a pull-request if my proposal is approved.
BTW thanks for a handy library.