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
When the Rocket.Chat REST API responds with 401 due to invalid authentication, the response looks like this (prettified):
{
"status": "error",
"message": "You must be logged in to do this."
}
However, the error handling in the Request::send method is a mere success handler (literally, by checking if the JSON response has a success property with a falsy value):
The final bool return value of the method, (static::$responseCode >= 200) && (static::$responseCode < 300), could handle this case but Request::sends return value appears to be unused elsewhere in the package.
The text was updated successfully, but these errors were encountered:
When the Rocket.Chat REST API responds with 401 due to invalid authentication, the response looks like this (prettified):
However, the error handling in the
Request::send
method is a mere success handler (literally, by checking if the JSON response has asuccess
property with a falsy value):rocket-chat/src/Common/Request.php
Lines 125 to 139 in 66895dc
The final
bool
return value of the method,(static::$responseCode >= 200) && (static::$responseCode < 300)
, could handle this case butRequest::send
s return value appears to be unused elsewhere in the package.The text was updated successfully, but these errors were encountered: