Skip to content
Snippets Groups Projects
  • Iustin Pop's avatar
    Improve handling of lock exceptions · a9d40c65
    Iustin Pop authored
    
    There are two issues with lock exceptions right now:
    
    - first, we don't log the original error; this is fine for now
      (locking.py always returns the same error here), but in general is
      brittle: if locking.py would start returning more information, we'd
      completely miss that
    
    - second, an actual honest lock conflict is not an internal error;
      it's simply an optimistic lock failing, and as such we should not
      return internal error, but rather resource_not_unique
    
    This addresses issue 287.
    
    Signed-off-by: default avatarIustin Pop <iustin@google.com>
    Reviewed-by: default avatarBernardo Dal Seno <bdalseno@google.com>
    a9d40c65