Problem/Motivation
When the remote URL configured in `site_audit_send` is unreachable, a fatal PHP error is thrown:
Error: Call to undefined method GuzzleHttp\Exception\ConnectException::hasResponse()
in /docroot/modules/contrib/site_audit/site_audit_send/src/RestClient.php on line 118
Steps to reproduce
1. Install and enable `site_audit_send`.
2. Configure an unreachable or invalid remote URL under the module settings.
3. Trigger a report send (or use the test URL feature).
4. Observe the fatal error.
Proposed resolution
Add an `instanceof RequestException` guard before calling `hasResponse()` in both catch blocks inside `RestClient.php`.
Remaining tasks
User interface changes
API changes
Data model changes
Issue fork site_audit-3583041
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #4
froboyComment #5
froboy