You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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).
The text was updated successfully, but these errors were encountered:
TalkApi::getComments() doesn't check any headers, the request simply returns ["Endpoint not found"] Rather than check for that string in web2 I think we should maybe have the Endpoint not found changed to return false? (which we do check for and throw an exception)
Issue there is we're using file_get_contents() to grab the response, which means it'll never return boolean false if we get a response at all. So just changing the response body doesn't help us.
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).
The text was updated successfully, but these errors were encountered: