ymcatwincities/openy_gated_content

Logger instance is invoked but not injected into RecliqueClientService.php

Closed this issue · 0 comments

When attempting to use the "Open Y Virtual YMCA Auth ReClique" module, if the API user credentials are not correct, the actual error from the ReClique CORE API is obfuscated by an error thrown in RecliqueClientService.php's getUserData(string) function. A call to an instance level $logger is made, but no $logger is defined for the class.

Repro steps:

  1. Enable the "Open Y Virtual YMCA Auth ReClique" module for a site using ReClique CORE crm.
  2. Configure the module with incorrect API user credentials, and use the default Staging endpoint from Reclique.
  3. Attempt member login using any email address - for this repro a legit member email is not required.

Logged error is "Error: Call to undefined method Drupal\openy_gc_auth_reclique\RecliqueClientService::logger() in Drupal\openy_gc_auth_reclique\RecliqueClientService->getUserData() (line 75 of /var/aegir/platforms/ycloud_0.8.0/docroot/modules/contrib/openy_gated_content/modules/openy_gc_auth/modules/openy_gc_auth_reclique/src/RecliqueClientService.php)"

Actual error is:
"Client error: POST https://staging.recliquecore.com/api/v1/members/virtual_y/?Email=nan_dec%40yahoo.com resulted in a 403 Forbidden response:
{"status":"error","msg":"Check your credentials"}"

RecliqueClientService getUserData