SQLAlchemy bad error handling
- Dominant language
- Python
- Stars
- 19
- Forks
- 45
- Avg merge
- 4d 23h
- Merged PRs (30d)
- 12
Description
SQLAlchemy doesn't give us the right "confort" for error handling. We need to handle it depending on which db engine we are using, and we need to use test like `"text in the error detail" in e.details`. For later, we'll need to find a better way.
# Context from PR
If we check if an error is an instance of another module `pymysql` we *could potentially* catch some errors as code that are specific on a `db`. And even with that, I saw errors where people had to use both `IntegrityError` from sql-alchemy and `pymy` integrity error because of a bad handling..
It is not pretty, and you can read this response: https://stackoverflow.com/a/70714697
_Originally posted by @Robin-Van-de-Merghel in https://github.com/DIRACGrid/diracx/pull/421#discussion_r2028828354_
Contributor guide
Assessment
This issue has not been assessed yet.