tl-its-umich-edu / canvas-app-explorer

A Web application that presents a list of Canvas external (LTI) tools with details. When integrated within Canvas, the user can search for specific LTI tool(s), and add or remove those tools from Canvas courses.
Apache License 2.0
4 stars 6 forks source link

Pass Canvas error information to the Django API error response #205

Closed ssciolla closed 2 years ago

ssciolla commented 2 years ago

I think this PUT call invokes the LTIToolViewSet>update function inside Views.py. In line 57 of Views.py, where the Response is returned in Exception handling block:

try:
    manager.update_tool_navigation(canvas_id_num, not navigation_enabled)
except Exception as err:
    logger.error(err)
    return Response(status=500)

Could the Response object also include the err message, or some other user friendly error message?

_Originally posted by @zqian in https://github.com/tl-its-umich-edu/canvas-app-explorer/pull/196#discussion_r898655295_

zqian commented 2 years ago

Ran the test.py file and verified the successful run of test cases.