Skip to content

Commit 9bf26df

Browse files
fix: raise GitlabHeadError in project.files.head() method (#3006)
When an error occurs, raise `GitlabHeadError` in `project.files.head()` method. Closes: #3004
1 parent 2ab0b9f commit 9bf26df

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

gitlab/v4/objects/files.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,7 @@ def get(self, file_path: str, ref: str, **kwargs: Any) -> ProjectFile:
137137
assert isinstance(server_data, dict)
138138
return self._obj_cls(self, server_data)
139139

140+
@exc.on_http_error(exc.GitlabHeadError)
140141
def head(
141142
self, file_path: str, ref: str, **kwargs: Any
142143
) -> "requests.structures.CaseInsensitiveDict[Any]":

0 commit comments

Comments
 (0)
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