def post(self): try: user_dict = dict() body = request.get_json() user = User(**body) user.representation = [] user.hash_password() user.save() id = user.id return {'id': str(id)}, 200 except FieldDoesNotExist: raise SchemaValidationError except NotUniqueError: raise EmailAlreadyExistsError except Exception as e: raise InternalServerError