pyCraft icon indicating copy to clipboard operation
pyCraft copied to clipboard

Authentication join() method ignores errors

Open lorissikora opened this issue 6 years ago • 0 comments

During the join operation the code at

https://github.com/ammaraskar/pyCraft/blob/ff9a0813b64a0afdf3cd089ad9000350bb4122bc/minecraft/authentication.py#L263-L265

correctly checks if the returned status code is anything else than 204 and tries to raise an error if so. However it is then ignored by _raise_from_response since it has an additional check for the error code not being 'ok':

https://github.com/ammaraskar/pyCraft/blob/ff9a0813b64a0afdf3cd089ad9000350bb4122bc/minecraft/authentication.py#L285-L291

I assume it is also the case for the method invalidate(). https://github.com/ammaraskar/pyCraft/blob/ff9a0813b64a0afdf3cd089ad9000350bb4122bc/minecraft/authentication.py#L263-L265

I have not tested it on this method however.

lorissikora avatar Apr 26 '20 21:04 lorissikora