Problem/Motivation

Steps to reproduce:
- Set up a google api key which is incorrect (any random string would do, but for a more common scenario, try a google browser key that was not activated for the Google Vision api).
- Set up a content type / fields as indicated on the module's instructions
- Create a content with a sample image, click "Save"
- WSOD

Proposed resolution

Use a Try/Catch to handle the exception raised by the http client if the response to the POST is not successful

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

marcoscano created an issue. See original summary.

marcoscano’s picture

Assigned: marcoscano » Unassigned
Status: Active » Needs review
FileSize
1.36 KB
naveenvalecha’s picture

Status: Needs review » Reviewed & tested by the community

Looks good.
There's already a task here #2736567: Handle errors in Response Closing that as duplicate.

naveenvalecha’s picture

Status: Reviewed & tested by the community » Fixed

Committed and pushed to 8.x-1.x
Thanks!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.