handle some thrift errors