Skip to content

Talk comment API request doesn't check HTTP response code, fails non-gracefully if not OK #881

@iansltx

Description

@iansltx

See joindin/joindin-api#747 for more info on why this is a problem.

In TalkApi::getComments(), we should throw if the HTTP status code for that endpoint is non-200 (even 20x > 200 doesn't make sense here). We should catch that exception in callers and display something to the effect of "comments cannot be displayed right now", particularly if comments aren't the only thing on the page the user is viewing.

We should also log an error when we wind up in this situation, to ensure that monitoring will still pick up the errors (vs. silently running in a degraded state).

Metadata

Metadata

Assignees

No one assigned

    Labels

    Bughelp wantedStuff that we would love contributions for

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions