[WIP] Raise authentication failure when query goes wrong because of authentica...

...tion failure