Skip to content

Commit 20cce71

Browse files
committed
Error as
1 parent 62e7687 commit 20cce71

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

provider_gitlab.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,8 @@ func (GitLabProvider) UpdateBookmarks(ctx context.Context, user string, token *o
197197
}
198198
_, _, err = c.RepositoryFiles.UpdateFile(user+"/"+RepoName, "bookmarks.txt", opt)
199199
if err != nil {
200-
if respErr, ok := err.(*gitlab.ErrorResponse); ok {
200+
var respErr *gitlab.ErrorResponse
201+
if errors.As(err, &respErr) {
201202
if respErr.Response != nil && respErr.Response.StatusCode == http.StatusNotFound {
202203
return ErrRepoNotFound
203204
}

0 commit comments

Comments
 (0)