Skip to content

Require HTTP 200 before parsing JSON, send back better error for HTTP 502, etc... #52

@karendolan

Description

@karendolan

When Canvas is down, CACCL apps throw error

Error: Failed to parse response as undefined: Unexpected token '<', "<!DOCTYPE "... is not valid JSON

from call at https://github.com/harvard-edtech/caccl-api/blob/main/src/shared/genVisitEndpoint/index.ts#L153

This appears to users as message

This app cannot be launched this way because it is not yet installed into the course that you are launching from. Please contact support.

It would be less confusing to show a message that the CACCL app cannot be launched because of Communication problems with Canvas (for example, during a HTTP 502 response) and also to recommend that the user try to access the application directly from the Canvas course site. Which should resolve most problems anyway.

Metadata

Metadata

Assignees

No one assigned

    Labels

    help wantedExtra attention is needed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions