kaxil commented on a change in pull request #21517:
URL: https://github.com/apache/airflow/pull/21517#discussion_r811542185
##########
File path: airflow/www/fab_security/sqla/manager.py
##########
@@ -243,6 +244,9 @@ def add_role(self, name: str) -> Optional[Role]:
self.get_session.commit()
log.info(c.LOGMSG_INF_SEC_ADD_ROLE.format(name))
return role
+ except IntegrityError as e:
+ log.warning(c.LOGMSG_ERR_SEC_ADD_ROLE.format(str(e)))
+ self.get_session.rollback()
Review comment:
We are already catching the `Exception` on L250 which should also take
care of catching `IntegrityError`
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]