Add proper error reporting to shared db lock.