From 6494630dcca92b7a0b1ca4674a5d14cd8ea0f129 Mon Sep 17 00:00:00 2001 From: "John L. Villalovos" Date: Tue, 1 Oct 2024 08:29:46 -0700 Subject: [PATCH] fix: raise GitlabHeadError in `project.files.head()` method When an error occurs, raise `GitlabHeadError` in `project.files.head()` method. Closes: #3004 --- gitlab/v4/objects/files.py | 1 + 1 file changed, 1 insertion(+) diff --git a/gitlab/v4/objects/files.py b/gitlab/v4/objects/files.py index cbadb67ec..cded0db2f 100644 --- a/gitlab/v4/objects/files.py +++ b/gitlab/v4/objects/files.py @@ -137,6 +137,7 @@ def get(self, file_path: str, ref: str, **kwargs: Any) -> ProjectFile: assert isinstance(server_data, dict) return self._obj_cls(self, server_data) + @exc.on_http_error(exc.GitlabHeadError) def head( self, file_path: str, ref: str, **kwargs: Any ) -> "requests.structures.CaseInsensitiveDict[Any]": pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy