comparison libervia_server/__init__.py @ 374:f22a4bf9a67e

server_side: fix error management at account creation
author souliane <souliane@mailoo.org>
date Mon, 24 Feb 2014 19:05:35 +0100
parents c943fd54c90e
children 5e0e2032928c
comparison
equal deleted inserted replaced
373:724a9a03ab02 374:f22a4bf9a67e
639 def registered(result): 639 def registered(result):
640 request.write('REGISTRATION') 640 request.write('REGISTRATION')
641 request.finish() 641 request.finish()
642 642
643 def registeringError(failure): 643 def registeringError(failure):
644 reason = str(failure.value) 644 reason = failure.value.faultString
645 if reason == "ConflictError": 645 if reason == "ConflictError":
646 request.write('ALREADY EXISTS') 646 request.write('ALREADY EXISTS')
647 elif reason == "InternalError": 647 elif reason == "InternalError":
648 request.write('INTERNAL') 648 request.write('INTERNAL')
649 else: 649 else: