keep original error message when wrapping in DatabaseError

fixes #2521