comparison mercurial/httppeer.py @ 37654:8cea0d57bf37

httppeer: handle error response from client reactor With this in place, we're now seeing useful errors when running tests with the new wire protocol enabled! Differential Revision: https://phab.mercurial-scm.org/D3332
author Gregory Szorc <gregory.szorc@gmail.com>
date Thu, 12 Apr 2018 13:08:33 -0700
parents 950294e28136
children 1cb54e6193a6
comparison
equal deleted inserted replaced
37653:b2fa1591fb44 37654:8cea0d57bf37
761 761
762 if meta['eos']: 762 if meta['eos']:
763 f.set_result(result) 763 f.set_result(result)
764 del results[request.requestid] 764 del results[request.requestid]
765 765
766 elif action == 'error':
767 e = error.RepoError(meta['message'])
768
769 if f:
770 f.set_exception(e)
771 else:
772 raise e
773
766 else: 774 else:
767 e = error.ProgrammingError('unhandled action: %s' % action) 775 e = error.ProgrammingError('unhandled action: %s' % action)
768 776
769 if f: 777 if f:
770 f.set_exception(e) 778 f.set_exception(e)