Fix rollaback behavior (issue #480)

This commit fixes the bug with DbTx rollbacks and domain-specific
errors. What we do now is throwing an exception during the evaluation of
`DbFail`, to later catch it _after_ `withTransactionM` has performed a
clean rollback, and only at that point we call `throwError`.

This also means that we need to catch `DbTx` errors via the `MonadError`
interface, not via the exception-handling interface, to get proper
rollback behavior.
4 jobs for adinapoli/issue-480 in 37 minutes and 55 seconds (queued for 2 seconds)
Status Job ID Name Coverage
  Cabal
passed #18525
cabal

00:18:11

 
  Stack
passed #18526
stack

00:03:06

 
  Bench
manual #18527
allowed to fail manual
bench
 
  Test
failed #18528
test

00:16:38

 
Name Stage Failure
failed
test Test
Test suite garg-test-hspec: FAIL
Test suite logged to:
/builds/gargantext/haskell-gargantext/dist-newstyle/build/x86_64-linux/ghc-9.6.6/gargantext-0.0.7.4.7/t/garg-test-hspec/opt/test/gargantext-0.0.7.4.7-garg-test-hspec.log
0 of 1 test suites (0 of 1 test cases) passed.
Error: [Cabal-7125]
Tests failed for test:garg-test-hspec from gargantext-0.0.7.4.7.

Cleaning up project directory and file based variables
ERROR: Job failed: exit code 1