Currently when the API cannot connect, the error message get output via drupal_set_message. This outputs the error, which is largely a developer issue, to the end user. The attached patch uses watchdog to send the error to the log instead. I welcome any feedback others might have.

Cheers, Leah

CommentFileSizeAuthor
google_books_error_output.patch1.21 KBleahtard

Comments

darrell_ulm’s picture

Status: Active » Needs review

Thanks @leahtard ! This is something to look at. May have some other changes to go in as well.

Status: Needs review » Needs work

The last submitted patch, google_books_error_output.patch, failed testing.

darrell_ulm’s picture

Ah, interesting point, feel free to change a status to "needs review" and then the automated testing will evaluate the patch.

Was the patch written for the 7.x.1.x-dev or the 7.x.1.0 version? That could be the only issue. Feel free to resubmit if the error is obvious, and thank you.

  • quantumtime committed 11057d6 on 7.x-1.x
    Issue #2205963 by leahtard,quantumtime: API Error Output converted on...
darrell_ulm’s picture

Status: Needs work » Needs review

OK, see what the issue might be:

diff --git a/modules/contrib/google_books/google_books_api.module b/modules/contrib/google_books/google_books_api.module
index 09003a4..da8a08c 100644
--- a/modules/contrib/google_books/google_books_api.module
+++ b/modules/contrib/google_books/google_books_api.module

Looks like the patch was made realitive to the module directory instead of the project (google_books) in this case.

I re-rolled the patch, tested it and committed it to the current 7.x dev HEAD here:
https://www.drupal.org/node/1372154/git-instructions/7.x-1.x/nonmaintainer

Thanks for the update, think we need to make a release for the changes. :)

  • quantumtime committed 0d9ca74 on 7.x-1.x authored by leahtard
    Issue #2205963 by leahtard,quantumtime: API format fix, and to give...

  • quantumtime committed 11057d6 on 7.x-2.x
    Issue #2205963 by leahtard,quantumtime: API Error Output converted on...
  • quantumtime committed 0d9ca74 on 7.x-2.x authored by leahtard
    Issue #2205963 by leahtard,quantumtime: API format fix, and to give...
darrell_ulm’s picture

Version: 7.x-1.x-dev » 7.x-2.0
Status: Needs review » Fixed

Fixed in release version 7.x-2.0

Status: Fixed » Closed (fixed)

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