8000 fix: raise GitlabHeadError in `project.files.head()` method (#3006) · python-gitlab/python-gitlab@9bf26df · GitHub
[go: up one dir, main page]

Skip to content
8000

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