Yep, realized this only happens against the authentication error - which returns the content-type as text/plain instead of JSON.