Updated the PR with a fix to the test. Think the wrapping is useful, since otherwise the exception has a stack trace from the remote db, which makes debugging hard.