better error when token is invalid
I tried using cwclientlib with a token after its expiration date and here is what I got:
{'message': "The server could not comply with the request since it is either malformed or otherwise incorrect.\n\n\ncouldn't handle this request as it is either badly formed or is lacking the correct authorizations\n\n", 'code': '400 Bad Request', 'title': 'Bad Request'}
on the server, I found in the logs
2023-12-12 21:02:27 - (cubicweb_web.bwcompat) WARNING: failed to select a controller for this request /rqlio/1.0 POST. Here were the candidates controllers (but none matched):
* <class 'cubicweb_rqlcontroller.views.JsonRqlIOController'>
* <class 'cubicweb_rqlcontroller.views.MultipartRqlIOController'>
* <class 'cubicweb_rqlcontroller.views.AnonMultipartRqlIOController'>
* <class 'cubicweb_rqlcontroller.views.AuthenticatedMultipartRqlIOController'>
at first I thought that the problem was in the code, but I saw that other users did not have the problem and looked at my virtualenv, then at my configuration.
Could we do something to improve the error message sent when the token is invalid and clearly direct the user to her configuration ?