The way @vieux explained it to me, it's the same hack as before to infer the correct http code: look for specific strings in the error message printed.