There is an issue with the Canvas class method getResponse. It has an underscore "_getResponse" which is causing a php error when trying to use the API. It seems like removing this underscore makes everything all good and run again, so I made a tiny patch for it.

Repeatable: Always
Steps to repeat:

  1. Install Canvas API 8.x-1.x-dev version
  2. Enable and configure the module
  3. Use the GET method in a Canvas API call

Expected Results:
Send a GET request and get a JSON response back from Canvas.

Actual Results:
The page returns a php error related to an undefined method.

The website encountered an unexpected error. Please try again later.
Error: Call to undefined method Drupal\canvas_api\CanvasCourses::getResponse() in Drupal\canvas_api\Canvas->get() (line 77 of modules/contrib/canvas_api/src/Canvas.php).

Comments

brittany.huntzberry created an issue. See original summary.

brittany.huntzberry’s picture

StatusFileSize
new357 bytes
brittany.huntzberry’s picture

Status: Active » Needs review
brittany.huntzberry’s picture

Assigned: brittany.huntzberry » Unassigned

  • zerbash committed 22f0ac0 on 8.x-1.x
    Issue #3026610 by brittany.huntzberry: Remove underscore from Canvas...
zerbash’s picture

Status: Needs review » Fixed

Huh, don't know how that got in there. Thanks for catching that!

Status: Fixed » Closed (fixed)

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