Repository: xanzy/go-gitlab
Pull request #1709 (2023-04-23 11:21:34)

Return Environment on stop.
This removes manual parsing of the response json in clients, when they want to know the state, for example.


Patch:
diff --git a/access_requests.go b/access_requests.go
index 2e07187..a38f7ec 100644
--- a/access_requests.go
+++ b/access_requests.go
@@ -74,7 +74,7 @@ func (s *AccessRequestsService) ListProjectAccessRequests(pid interface{}, opt *
 		return nil, resp, err
 	}
 
-	return ars, resp, nil
+	return ars, resp, err
 }
 
 // ListGroupAccessRequests gets a list of access requests
@@ -100,7 +100,7 @@ func (s *AccessRequestsService) ListGroupAccessRequests(gid interface{}, opt *Li
 		return nil, resp, err
 	}
 
-	return ars, resp, nil
+	return ars, resp, err
 }
 
 // RequestProjectAccess requests access for the authenticated user
@@ -126,7 +126,7 @@ func (s *AccessRequestsService) RequestProjectAccess(pid interface{}, options ..
 		return nil, resp, err
 	}
 
-	return ar, resp, nil
+	return ar, resp, err
 }
 
 // RequestGroupAccess requests access for the authenticated user
@@ -152,7 +152,7 @@ func (s *AccessRequestsService) RequestGroupAccess(gid interface{}, options ...R
 		return nil, resp, err
 	}
 
-	return ar, resp, nil
+	return ar, resp, err
 }
 
 // ApproveAccessRequestOptions represents the available
@@ -186,7 +186,7 @@ func (s *AccessRequestsService) ApproveProjectAccessRequest(pid interface{}, use
 		return nil, resp, err
 	}
 
-	return ar, resp, nil
+	return ar, resp, err
 }
 
 // ApproveGroupAccessRequest approves an access request for the given user.
@@ -211,7 +211,7 @@ func (s *AccessRequestsService) ApproveGroupAccessRequest(gid interface{}, user
 		return nil, resp, err
 	}
 
-	return ar, resp, nil
+	return ar, resp, err
 }
 
 // DenyProjectAccessRequest denies an access request for the given user.
diff --git a/applications.go b/applications.go
index 5335f6c..cae0ca5 100644
--- a/applications.go
+++ b/applications.go
@@ -65,7 +65,7 @@ func (s *ApplicationsService) CreateApplication(opt *CreateApplicationOptions, o
 		return nil, resp, err
 	}
 
-	return a, resp, nil
+	return a, resp, err
 }
 
 // ListApplicationsOptions represents the available
@@ -87,7 +87,7 @@ func (s *ApplicationsService) ListApplications(opt *ListApplicationsOptions, opt
 		return nil, resp, err
 	}
 
-	return as, resp, nil
+	return as, resp, err
 }
 
 // DeleteApplication removes a specific application.
diff --git a/audit_events.go b/audit_events.go
index 95227c4..7473ecc 100644
--- a/audit_events.go
+++ b/audit_events.go
@@ -75,7 +75,7 @@ func (s *AuditEventsService) ListInstanceAuditEvents(opt *ListAuditEventsOptions
 		return nil, resp, err
 	}
 
-	return aes, resp, nil
+	return aes, resp, err
 }
 
 // GetInstanceAuditEvent gets a specific instance audit event.
@@ -96,7 +96,7 @@ func (s *AuditEventsService) GetInstanceAuditEvent(event int, options ...Request
 		return nil, resp, err
 	}
 
-	return ae, resp, nil
+	return ae, resp, err
 }
 
 // ListGroupAuditEvents gets a list of audit events for the specified group
@@ -121,7 +121,7 @@ func (s *AuditEventsService) ListGroupAuditEvents(gid interface{}, opt *ListAudi
 		return nil, resp, err
 	}
 
-	return aes, resp, nil
+	return aes, resp, err
 }
 
 // GetGroupAuditEvent gets a specific group audit event.
@@ -145,7 +145,7 @@ func (s *AuditEventsService) GetGroupAuditEvent(gid interface{}, event int, opti
 		return nil, resp, err
 	}
 
-	return ae, resp, nil
+	return ae, resp, err
 }
 
 // ListProjectAuditEvents gets a list of audit events for the specified project
@@ -170,7 +170,7 @@ func (s *AuditEventsService) ListProjectAuditEvents(pid interface{}, opt *ListAu
 		return nil, resp, err
 	}
 
-	return aes, resp, nil
+	return aes, resp, err
 }
 
 // GetProjectAuditEvent gets a specific project audit event.
@@ -195,5 +195,5 @@ func (s *AuditEventsService) GetProjectAuditEvent(pid interface{}, event int, op
 		return nil, resp, err
 	}
 
-	return ae, resp, nil
+	return ae, resp, err
 }
diff --git a/award_emojis.go b/award_emojis.go
index f7673a3..8847537 100644
--- a/award_emojis.go
+++ b/award_emojis.go
@@ -109,7 +109,7 @@ func (s *AwardEmojiService) listAwardEmoji(pid interface{}, resource string, res
 		return nil, resp, err
 	}
 
-	return as, resp, nil
+	return as, resp, err
 }
 
 // GetMergeRequestAwardEmoji get an award emoji from merge request.
@@ -159,7 +159,7 @@ func (s *AwardEmojiService) getAwardEmoji(pid interface{}, resource string, reso
 		return nil, resp, err
 	}
 
-	return a, resp, nil
+	return a, resp, err
 }
 
 // CreateAwardEmojiOptions represents the available options for awarding emoji
@@ -217,7 +217,7 @@ func (s *AwardEmojiService) createAwardEmoji(pid interface{}, resource string, r
 		return nil, resp, err
 	}
 
-	return a, resp, nil
+	return a, resp, err
 }
 
 // DeleteIssueAwardEmoji delete award emoji on an issue.
@@ -309,7 +309,7 @@ func (s *AwardEmojiService) listAwardEmojiOnNote(pid interface{}, resources stri
 		return nil, resp, err
 	}
 
-	return as, resp, nil
+	return as, resp, err
 }
 
 // GetIssuesAwardEmojiOnNote gets an award emoji on a note from an issue.
@@ -362,7 +362,7 @@ func (s *AwardEmojiService) getSingleNoteAwardEmoji(pid interface{}, ressource s
 		return nil, resp, err
 	}
 
-	return a, resp, nil
+	return a, resp, err
 }
 
 // CreateIssuesAwardEmojiOnNote gets an award emoji on a note from an issue.
@@ -417,7 +417,7 @@ func (s *AwardEmojiService) createAwardEmojiOnNote(pid interface{}, resource str
 		return nil, resp, err
 	}
 
-	return a, resp, nil
+	return a, resp, err
 }
 
 // DeleteIssuesAwardEmojiOnNote deletes an award emoji on a note from an issue.
diff --git a/boards.go b/boards.go
index 8b5eb79..d8ce457 100644
--- a/boards.go
+++ b/boards.go
@@ -104,7 +104,7 @@ func (s *IssueBoardsService) CreateIssueBoard(pid interface{}, opt *CreateIssueB
 		return nil, resp, err
 	}
 
-	return board, resp, nil
+	return board, resp, err
 }
 
 // UpdateIssueBoardOptions represents the available UpdateIssueBoard() options.
@@ -139,7 +139,7 @@ func (s *IssueBoardsService) UpdateIssueBoard(pid interface{}, board int, opt *U
 		return nil, resp, err
 	}
 
-	return is, resp, nil
+	return is, resp, err
 }
 
 // DeleteIssueBoard deletes an issue board.
@@ -186,7 +186,7 @@ func (s *IssueBoardsService) ListIssueBoards(pid interface{}, opt *ListIssueBoar
 		return nil, resp, err
 	}
 
-	return is, resp, nil
+	return is, resp, err
 }
 
 // GetIssueBoard gets a single issue board of a project.
@@ -210,7 +210,7 @@ func (s *IssueBoardsService) GetIssueBoard(pid interface{}, board int, options .
 		return nil, resp, err
 	}
 
-	return ib, resp, nil
+	return ib, resp, err
 }
 
 // GetIssueBoardListsOptions represents the available GetIssueBoardLists() options.
@@ -240,7 +240,7 @@ func (s *IssueBoardsService) GetIssueBoardLists(pid interface{}, board int, opt
 		return nil, resp, err
 	}
 
-	return bl, resp, nil
+	return bl, resp, err
 }
 
 // GetIssueBoardList gets a single issue board list.
@@ -268,7 +268,7 @@ func (s *IssueBoardsService) GetIssueBoardList(pid interface{}, board, list int,
 		return nil, resp, err
 	}
 
-	return bl, resp, nil
+	return bl, resp, err
 }
 
 // CreateIssueBoardListOptions represents the available CreateIssueBoardList()
@@ -303,7 +303,7 @@ func (s *IssueBoardsService) CreateIssueBoardList(pid interface{}, board int, op
 		return nil, resp, err
 	}
 
-	return bl, resp, nil
+	return bl, resp, err
 }
 
 // UpdateIssueBoardListOptions represents the available UpdateIssueBoardList()
@@ -339,7 +339,7 @@ func (s *IssueBoardsService) UpdateIssueBoardList(pid interface{}, board, list i
 		return nil, resp, err
 	}
 
-	return bl, resp, nil
+	return bl, resp, err
 }
 
 // DeleteIssueBoardList soft deletes an issue board list. Only for admins and
diff --git a/branches.go b/branches.go
index 725ec0c..57ccdc0 100644
--- a/branches.go
+++ b/branches.go
@@ -81,7 +81,7 @@ func (s *BranchesService) ListBranches(pid interface{}, opts *ListBranchesOption
 		return nil, resp, err
 	}
 
-	return b, resp, nil
+	return b, resp, err
 }
 
 // GetBranch gets a single project repository branch.
@@ -106,7 +106,7 @@ func (s *BranchesService) GetBranch(pid interface{}, branch string, options ...R
 		return nil, resp, err
 	}
 
-	return b, resp, nil
+	return b, resp, err
 }
 
 // ProtectBranchOptions represents the available ProtectBranch() options.
@@ -145,7 +145,7 @@ func (s *BranchesService) ProtectBranch(pid interface{}, branch string, opts *Pr
 		return nil, resp, err
 	}
 
-	return b, resp, nil
+	return b, resp, err
 }
 
 // UnprotectBranch unprotects a single project repository branch. This is an
@@ -175,7 +175,7 @@ func (s *BranchesService) UnprotectBranch(pid interface{}, branch string, option
 		return nil, resp, err
 	}
 
-	return b, resp, nil
+	return b, resp, err
 }
 
 // CreateBranchOptions represents the available CreateBranch() options.
@@ -209,7 +209,7 @@ func (s *BranchesService) CreateBranch(pid interface{}, opt *CreateBranchOptions
 		return nil, resp, err
 	}
 
-	return b, resp, nil
+	return b, resp, err
 }
 
 // DeleteBranch deletes an existing branch.
diff --git a/broadcast_messages.go b/broadcast_messages.go
index 3d0c61d..029f939 100644
--- a/broadcast_messages.go
+++ b/broadcast_messages.go
@@ -73,7 +73,7 @@ func (s *BroadcastMessagesService) ListBroadcastMessages(opt *ListBroadcastMessa
 		return nil, resp, err
 	}
 
-	return bs, resp, nil
+	return bs, resp, err
 }
 
 // GetBroadcastMessage gets a single broadcast message.
@@ -94,7 +94,7 @@ func (s *BroadcastMessagesService) GetBroadcastMessage(broadcast int, options ..
 		return nil, resp, err
 	}
 
-	return b, resp, nil
+	return b, resp, err
 }
 
 // CreateBroadcastMessageOptions represents the available CreateBroadcastMessage()
@@ -132,7 +132,7 @@ func (s *BroadcastMessagesService) CreateBroadcastMessage(opt *CreateBroadcastMe
 		return nil, resp, err
 	}
 
-	return b, resp, nil
+	return b, resp, err
 }
 
 // UpdateBroadcastMessageOptions represents the available CreateBroadcastMessage()
@@ -172,7 +172,7 @@ func (s *BroadcastMessagesService) UpdateBroadcastMessage(broadcast int, opt *Up
 		return nil, resp, err
 	}
 
-	return b, resp, nil
+	return b, resp, err
 }
 
 // DeleteBroadcastMessage deletes a broadcasted message.
diff --git a/ci_yml_templates.go b/ci_yml_templates.go
index 992fe11..974ab7d 100644
--- a/ci_yml_templates.go
+++ b/ci_yml_templates.go
@@ -70,7 +70,7 @@ func (s *CIYMLTemplatesService) ListAllTemplates(opt *ListCIYMLTemplatesOptions,
 		return nil, resp, err
 	}
 
-	return cts, resp, nil
+	return cts, resp, err
 }
 
 // GetTemplate get a single GitLab CI YML template.
@@ -91,5 +91,5 @@ func (s *CIYMLTemplatesService) GetTemplate(key string, options ...RequestOption
 		return nil, resp, err
 	}
 
-	return ct, resp, nil
+	return ct, resp, err
 }
diff --git a/cluster_agents.go b/cluster_agents.go
index 1153fea..907f753 100644
--- a/cluster_agents.go
+++ b/cluster_agents.go
@@ -103,7 +103,7 @@ func (s *ClusterAgentsService) ListAgents(pid interface{}, opt *ListAgentsOption
 		return nil, resp, err
 	}
 
-	return as, resp, nil
+	return as, resp, err
 }
 
 // GetAgent gets a single agent details.
@@ -128,7 +128,7 @@ func (s *ClusterAgentsService) GetAgent(pid interface{}, id int, options ...Requ
 		return nil, resp, err
 	}
 
-	return a, resp, nil
+	return a, resp, err
 }
 
 // RegisterAgentOptions represents the available RegisterAgent()
@@ -162,7 +162,7 @@ func (s *ClusterAgentsService) RegisterAgent(pid interface{}, opt *RegisterAgent
 		return nil, resp, err
 	}
 
-	return a, resp, nil
+	return a, resp, err
 }
 
 // DeleteAgent deletes an existing agent registration.
@@ -212,7 +212,7 @@ func (s *ClusterAgentsService) ListAgentTokens(pid interface{}, aid int, opt *Li
 		return nil, resp, err
 	}
 
-	return ats, resp, nil
+	return ats, resp, err
 }
 
 // GetAgentToken gets a single agent token.
@@ -237,7 +237,7 @@ func (s *ClusterAgentsService) GetAgentToken(pid interface{}, aid int, id int, o
 		return nil, resp, err
 	}
 
-	return at, resp, nil
+	return at, resp, err
 }
 
 // CreateAgentTokenOptions represents the available CreateAgentToken() options.
@@ -271,7 +271,7 @@ func (s *ClusterAgentsService) CreateAgentToken(pid interface{}, aid int, opt *C
 		return nil, resp, err
 	}
 
-	return at, resp, nil
+	return at, resp, err
 }
 
 // RevokeAgentToken revokes an agent token.
diff --git a/commits.go b/commits.go
index 7c724c2..e6d64c4 100644
--- a/commits.go
+++ b/commits.go
@@ -104,7 +104,7 @@ func (s *CommitsService) ListCommits(pid interface{}, opt *ListCommitsOptions, o
 		return nil, resp, err
 	}
 
-	return c, resp, nil
+	return c, resp, err
 }
 
 // CommitRef represents the reference of branches/tags in a commit.
@@ -147,7 +147,7 @@ func (s *CommitsService) GetCommitRefs(pid interface{}, sha string, opt *GetComm
 		return nil, resp, err
 	}
 
-	return cs, resp, nil
+	return cs, resp, err
 }
 
 // GetCommit gets a specific commit identified by the commit hash or name of a
@@ -175,7 +175,7 @@ func (s *CommitsService) GetCommit(pid interface{}, sha string, options ...Reque
 		return nil, resp, err
 	}
 
-	return c, resp, nil
+	return c, resp, err
 }
 
 // CreateCommitOptions represents the available options for a new commit.
@@ -229,7 +229,7 @@ func (s *CommitsService) CreateCommit(pid interface{}, opt *CreateCommitOptions,
 		return nil, resp, err
 	}
 
-	return c, resp, nil
+	return c, resp, err
 }
 
 // Diff represents a GitLab diff.
@@ -278,7 +278,7 @@ func (s *CommitsService) GetCommitDiff(pid interface{}, sha string, opt *GetComm
 		return nil, resp, err
 	}
 
-	return d, resp, nil
+	return d, resp, err
 }
 
 // CommitComment represents a GitLab commit comment.
@@ -335,7 +335,7 @@ func (s *CommitsService) GetCommitComments(pid interface{}, sha string, opt *Get
 		return nil, resp, err
 	}
 
-	return c, resp, nil
+	return c, resp, err
 }
 
 // PostCommitCommentOptions represents the available PostCommitComment()
@@ -374,7 +374,7 @@ func (s *CommitsService) PostCommitComment(pid interface{}, sha string, opt *Pos
 		return nil, resp, err
 	}
 
-	return c, resp, nil
+	return c, resp, err
 }
 
 // GetCommitStatusesOptions represents the available GetCommitStatuses() options.
@@ -428,7 +428,7 @@ func (s *CommitsService) GetCommitStatuses(pid interface{}, sha string, opt *Get
 		return nil, resp, err
 	}
 
-	return cs, resp, nil
+	return cs, resp, err
 }
 
 // SetCommitStatusOptions represents the available SetCommitStatus() options.
@@ -466,7 +466,7 @@ func (s *CommitsService) SetCommitStatus(pid interface{}, sha string, opt *SetCo
 		return nil, resp, err
 	}
 
-	return cs, resp, nil
+	return cs, resp, err
 }
 
 // ListMergeRequestsByCommit gets merge request associated with a commit.
@@ -491,7 +491,7 @@ func (s *CommitsService) ListMergeRequestsByCommit(pid interface{}, sha string,
 		return nil, resp, err
 	}
 
-	return mrs, resp, nil
+	return mrs, resp, err
 }
 
 // CherryPickCommitOptions represents the available CherryPickCommit() options.
@@ -524,7 +524,7 @@ func (s *CommitsService) CherryPickCommit(pid interface{}, sha string, opt *Cher
 		return nil, resp, err
 	}
 
-	return c, resp, nil
+	return c, resp, err
 }
 
 // RevertCommitOptions represents the available RevertCommit() options.
@@ -555,7 +555,7 @@ func (s *CommitsService) RevertCommit(pid interface{}, sha string, opt *RevertCo
 		return nil, resp, err
 	}
 
-	return c, resp, nil
+	return c, resp, err
 }
 
 // GPGSignature represents a Gitlab commit's GPG Signature.
@@ -592,5 +592,5 @@ func (s *CommitsService) GetGPGSiganature(pid interface{}, sha string, options .
 		return nil, resp, err
 	}
 
-	return sig, resp, nil
+	return sig, resp, err
 }
diff --git a/container_registry.go b/container_registry.go
index eaf0e34..a85e0cb 100644
--- a/container_registry.go
+++ b/container_registry.go
@@ -102,7 +102,7 @@ func (s *ContainerRegistryService) ListProjectRegistryRepositories(pid interface
 		return nil, resp, err
 	}
 
-	return repos, resp, nil
+	return repos, resp, err
 }
 
 // ListGroupRegistryRepositories gets a list of registry repositories in a group.
@@ -127,7 +127,7 @@ func (s *ContainerRegistryService) ListGroupRegistryRepositories(gid interface{}
 		return nil, resp, err
 	}
 
-	return repos, resp, nil
+	return repos, resp, err
 }
 
 // GetSingleRegistryRepositoryOptions represents the available
@@ -162,7 +162,7 @@ func (s *ContainerRegistryService) GetSingleRegistryRepository(pid interface{},
 		return nil, resp, err
 	}
 
-	return repo, resp, nil
+	return repo, resp, err
 }
 
 // DeleteRegistryRepository deletes a repository in a registry.
@@ -216,7 +216,7 @@ func (s *ContainerRegistryService) ListRegistryRepositoryTags(pid interface{}, r
 		return nil, resp, err
 	}
 
-	return tags, resp, nil
+	return tags, resp, err
 }
 
 // GetRegistryRepositoryTagDetail get details of a registry repository tag
@@ -245,7 +245,7 @@ func (s *ContainerRegistryService) GetRegistryRepositoryTagDetail(pid interface{
 		return nil, resp, err
 	}
 
-	return tag, resp, nil
+	return tag, resp, err
 }
 
 // DeleteRegistryRepositoryTag deletes a registry repository tag.
diff --git a/custom_attributes.go b/custom_attributes.go
index 244059d..54f61ce 100644
--- a/custom_attributes.go
+++ b/custom_attributes.go
@@ -73,7 +73,7 @@ func (s *CustomAttributesService) listCustomAttributes(resource string, id int,
 	if err != nil {
 		return nil, resp, err
 	}
-	return cas, resp, nil
+	return cas, resp, err
 }
 
 // GetCustomUserAttribute returns the user attribute with a speciifc key.
@@ -112,7 +112,7 @@ func (s *CustomAttributesService) getCustomAttribute(resource string, id int, ke
 	if err != nil {
 		return nil, resp, err
 	}
-	return ca, resp, nil
+	return ca, resp, err
 }
 
 // SetCustomUserAttribute sets the custom attributes of the specified user.
@@ -151,7 +151,7 @@ func (s *CustomAttributesService) setCustomAttribute(resource string, id int, c
 	if err != nil {
 		return nil, resp, err
 	}
-	return ca, resp, nil
+	return ca, resp, err
 }
 
 // DeleteCustomUserAttribute removes the custom attribute of the specified user.
diff --git a/deploy_keys.go b/deploy_keys.go
index e343bef..6e1cafb 100644
--- a/deploy_keys.go
+++ b/deploy_keys.go
@@ -99,7 +99,7 @@ func (s *DeployKeysService) ListAllDeployKeys(opt *ListInstanceDeployKeysOptions
 		return nil, resp, err
 	}
 
-	return ks, resp, nil
+	return ks, resp, err
 }
 
 // ListProjectDeployKeysOptions represents the available ListProjectDeployKeys()
@@ -131,7 +131,7 @@ func (s *DeployKeysService) ListProjectDeployKeys(pid interface{}, opt *ListProj
 		return nil, resp, err
 	}
 
-	return ks, resp, nil
+	return ks, resp, err
 }
 
 // GetDeployKey gets a single deploy key.
@@ -156,7 +156,7 @@ func (s *DeployKeysService) GetDeployKey(pid interface{}, deployKey int, options
 		return nil, resp, err
 	}
 
-	return k, resp, nil
+	return k, resp, err
 }
 
 // AddDeployKeyOptions represents the available ADDDeployKey() options.
@@ -193,7 +193,7 @@ func (s *DeployKeysService) AddDeployKey(pid interface{}, opt *AddDeployKeyOptio
 		return nil, resp, err
 	}
 
-	return k, resp, nil
+	return k, resp, err
 }
 
 // DeleteDeployKey deletes a deploy key from a project.
@@ -237,7 +237,7 @@ func (s *DeployKeysService) EnableDeployKey(pid interface{}, deployKey int, opti
 		return nil, resp, err
 	}
 
-	return k, resp, nil
+	return k, resp, err
 }
 
 // UpdateDeployKeyOptions represents the available UpdateDeployKey() options.
@@ -271,5 +271,5 @@ func (s *DeployKeysService) UpdateDeployKey(pid interface{}, deployKey int, opt
 		return nil, resp, err
 	}
 
-	return k, resp, nil
+	return k, resp, err
 }
diff --git a/deploy_tokens.go b/deploy_tokens.go
index f744b0e..07c53cc 100644
--- a/deploy_tokens.go
+++ b/deploy_tokens.go
@@ -62,7 +62,7 @@ func (s *DeployTokensService) ListAllDeployTokens(options ...RequestOptionFunc)
 		return nil, resp, err
 	}
 
-	return ts, resp, nil
+	return ts, resp, err
 }
 
 // ListProjectDeployTokensOptions represents the available ListProjectDeployTokens()
@@ -94,7 +94,7 @@ func (s *DeployTokensService) ListProjectDeployTokens(pid interface{}, opt *List
 		return nil, resp, err
 	}
 
-	return ts, resp, nil
+	return ts, resp, err
 }
 
 // GetProjectDeployToken gets a single deploy token.
@@ -119,7 +119,7 @@ func (s *DeployTokensService) GetProjectDeployToken(pid interface{}, deployToken
 		return nil, resp, err
 	}
 
-	return t, resp, nil
+	return t, resp, err
 }
 
 // CreateProjectDeployTokenOptions represents the available CreateProjectDeployToken() options.
@@ -155,7 +155,7 @@ func (s *DeployTokensService) CreateProjectDeployToken(pid interface{}, opt *Cre
 		return nil, resp, err
 	}
 
-	return t, resp, nil
+	return t, resp, err
 }
 
 // DeleteProjectDeployToken removes a deploy token from the project.
@@ -206,7 +206,7 @@ func (s *DeployTokensService) ListGroupDeployTokens(gid interface{}, opt *ListGr
 		return nil, resp, err
 	}
 
-	return ts, resp, nil
+	return ts, resp, err
 }
 
 // GetGroupDeployToken gets a single deploy token.
@@ -231,7 +231,7 @@ func (s *DeployTokensService) GetGroupDeployToken(gid interface{}, deployToken i
 		return nil, resp, err
 	}
 
-	return t, resp, nil
+	return t, resp, err
 }
 
 // CreateGroupDeployTokenOptions represents the available CreateGroupDeployToken() options.
@@ -267,7 +267,7 @@ func (s *DeployTokensService) CreateGroupDeployToken(gid interface{}, opt *Creat
 		return nil, resp, err
 	}
 
-	return t, resp, nil
+	return t, resp, err
 }
 
 // DeleteGroupDeployToken removes a deploy token from the group.
diff --git a/deployments.go b/deployments.go
index 40ac4ed..251dd2f 100644
--- a/deployments.go
+++ b/deployments.go
@@ -107,7 +107,7 @@ func (s *DeploymentsService) ListProjectDeployments(pid interface{}, opts *ListP
 		return nil, resp, err
 	}
 
-	return ds, resp, nil
+	return ds, resp, err
 }
 
 // GetProjectDeployment get a deployment for a project.
@@ -131,7 +131,7 @@ func (s *DeploymentsService) GetProjectDeployment(pid interface{}, deployment in
 		return nil, resp, err
 	}
 
-	return d, resp, nil
+	return d, resp, err
 }
 
 // CreateProjectDeploymentOptions represents the available
@@ -167,7 +167,7 @@ func (s *DeploymentsService) CreateProjectDeployment(pid interface{}, opt *Creat
 		return nil, resp, err
 	}
 
-	return d, resp, nil
+	return d, resp, err
 }
 
 // UpdateProjectDeploymentOptions represents the available
@@ -199,5 +199,5 @@ func (s *DeploymentsService) UpdateProjectDeployment(pid interface{}, deployment
 		return nil, resp, err
 	}
 
-	return d, resp, nil
+	return d, resp, err
 }
diff --git a/deployments_merge_requests.go b/deployments_merge_requests.go
index 8417f91..1958f0e 100644
--- a/deployments_merge_requests.go
+++ b/deployments_merge_requests.go
@@ -49,5 +49,5 @@ func (s *DeploymentMergeRequestsService) ListDeploymentMergeRequests(pid interfa
 		return nil, resp, err
 	}
 
-	return mrs, resp, nil
+	return mrs, resp, err
 }
diff --git a/discussions.go b/discussions.go
index b4d7f24..9b673e2 100644
--- a/discussions.go
+++ b/discussions.go
@@ -73,7 +73,7 @@ func (s *DiscussionsService) ListIssueDiscussions(pid interface{}, issue int, op
 		return nil, resp, err
 	}
 
-	return ds, resp, nil
+	return ds, resp, err
 }
 
 // GetIssueDiscussion returns a single discussion for a specific project issue.
@@ -102,7 +102,7 @@ func (s *DiscussionsService) GetIssueDiscussion(pid interface{}, issue int, disc
 		return nil, resp, err
 	}
 
-	return d, resp, nil
+	return d, resp, err
 }
 
 // CreateIssueDiscussionOptions represents the available CreateIssueDiscussion()
@@ -137,7 +137,7 @@ func (s *DiscussionsService) CreateIssueDiscussion(pid interface{}, issue int, o
 		return nil, resp, err
 	}
 
-	return d, resp, nil
+	return d, resp, err
 }
 
 // AddIssueDiscussionNoteOptions represents the available AddIssueDiscussionNote()
@@ -176,7 +176,7 @@ func (s *DiscussionsService) AddIssueDiscussionNote(pid interface{}, issue int,
 		return nil, resp, err
 	}
 
-	return n, resp, nil
+	return n, resp, err
 }
 
 // UpdateIssueDiscussionNoteOptions represents the available
@@ -216,7 +216,7 @@ func (s *DiscussionsService) UpdateIssueDiscussionNote(pid interface{}, issue in
 		return nil, resp, err
 	}
 
-	return n, resp, nil
+	return n, resp, err
 }
 
 // DeleteIssueDiscussionNote deletes an existing discussion of an issue.
@@ -273,7 +273,7 @@ func (s *DiscussionsService) ListSnippetDiscussions(pid interface{}, snippet int
 		return nil, resp, err
 	}
 
-	return ds, resp, nil
+	return ds, resp, err
 }
 
 // GetSnippetDiscussion returns a single discussion for a given snippet.
@@ -302,7 +302,7 @@ func (s *DiscussionsService) GetSnippetDiscussion(pid interface{}, snippet int,
 		return nil, resp, err
 	}
 
-	return d, resp, nil
+	return d, resp, err
 }
 
 // CreateSnippetDiscussionOptions represents the available
@@ -338,7 +338,7 @@ func (s *DiscussionsService) CreateSnippetDiscussion(pid interface{}, snippet in
 		return nil, resp, err
 	}
 
-	return d, resp, nil
+	return d, resp, err
 }
 
 // AddSnippetDiscussionNoteOptions represents the available
@@ -378,7 +378,7 @@ func (s *DiscussionsService) AddSnippetDiscussionNote(pid interface{}, snippet i
 		return nil, resp, err
 	}
 
-	return n, resp, nil
+	return n, resp, err
 }
 
 // UpdateSnippetDiscussionNoteOptions represents the available
@@ -418,7 +418,7 @@ func (s *DiscussionsService) UpdateSnippetDiscussionNote(pid interface{}, snippe
 		return nil, resp, err
 	}
 
-	return n, resp, nil
+	return n, resp, err
 }
 
 // DeleteSnippetDiscussionNote deletes an existing discussion of a snippet.
@@ -478,7 +478,7 @@ func (s *DiscussionsService) ListGroupEpicDiscussions(gid interface{}, epic int,
 		return nil, resp, err
 	}
 
-	return ds, resp, nil
+	return ds, resp, err
 }
 
 // GetEpicDiscussion returns a single discussion for a given epic.
@@ -507,7 +507,7 @@ func (s *DiscussionsService) GetEpicDiscussion(gid interface{}, epic int, discus
 		return nil, resp, err
 	}
 
-	return d, resp, nil
+	return d, resp, err
 }
 
 // CreateEpicDiscussionOptions represents the available CreateEpicDiscussion()
@@ -546,7 +546,7 @@ func (s *DiscussionsService) CreateEpicDiscussion(gid interface{}, epic int, opt
 		return nil, resp, err
 	}
 
-	return d, resp, nil
+	return d, resp, err
 }
 
 // AddEpicDiscussionNoteOptions represents the available
@@ -585,7 +585,7 @@ func (s *DiscussionsService) AddEpicDiscussionNote(gid interface{}, epic int, di
 		return nil, resp, err
 	}
 
-	return n, resp, nil
+	return n, resp, err
 }
 
 // UpdateEpicDiscussionNoteOptions represents the available UpdateEpicDiscussion()
@@ -625,7 +625,7 @@ func (s *DiscussionsService) UpdateEpicDiscussionNote(gid interface{}, epic int,
 		return nil, resp, err
 	}
 
-	return n, resp, nil
+	return n, resp, err
 }
 
 // DeleteEpicDiscussionNote deletes an existing discussion of a epic.
@@ -685,7 +685,7 @@ func (s *DiscussionsService) ListMergeRequestDiscussions(pid interface{}, mergeR
 		return nil, resp, err
 	}
 
-	return ds, resp, nil
+	return ds, resp, err
 }
 
 // GetMergeRequestDiscussion returns a single discussion for a given merge
@@ -715,7 +715,7 @@ func (s *DiscussionsService) GetMergeRequestDiscussion(pid interface{}, mergeReq
 		return nil, resp, err
 	}
 
-	return d, resp, nil
+	return d, resp, err
 }
 
 // CreateMergeRequestDiscussionOptions represents the available
@@ -756,7 +756,7 @@ func (s *DiscussionsService) CreateMergeRequestDiscussion(pid interface{}, merge
 		return nil, resp, err
 	}
 
-	return d, resp, nil
+	return d, resp, err
 }
 
 // ResolveMergeRequestDiscussionOptions represents the available
@@ -795,7 +795,7 @@ func (s *DiscussionsService) ResolveMergeRequestDiscussion(pid interface{}, merg
 		return nil, resp, err
 	}
 
-	return d, resp, nil
+	return d, resp, err
 }
 
 // AddMergeRequestDiscussionNoteOptions represents the available
@@ -835,7 +835,7 @@ func (s *DiscussionsService) AddMergeRequestDiscussionNote(pid interface{}, merg
 		return nil, resp, err
 	}
 
-	return n, resp, nil
+	return n, resp, err
 }
 
 // UpdateMergeRequestDiscussionNoteOptions represents the available
@@ -877,7 +877,7 @@ func (s *DiscussionsService) UpdateMergeRequestDiscussionNote(pid interface{}, m
 		return nil, resp, err
 	}
 
-	return n, resp, nil
+	return n, resp, err
 }
 
 // DeleteMergeRequestDiscussionNote deletes an existing discussion of a merge
@@ -938,7 +938,7 @@ func (s *DiscussionsService) ListCommitDiscussions(pid interface{}, commit strin
 		return nil, resp, err
 	}
 
-	return ds, resp, nil
+	return ds, resp, err
 }
 
 // GetCommitDiscussion returns a single discussion for a specific project
@@ -968,7 +968,7 @@ func (s *DiscussionsService) GetCommitDiscussion(pid interface{}, commit string,
 		return nil, resp, err
 	}
 
-	return d, resp, nil
+	return d, resp, err
 }
 
 // CreateCommitDiscussionOptions represents the available
@@ -1007,7 +1007,7 @@ func (s *DiscussionsService) CreateCommitDiscussion(pid interface{}, commit stri
 		return nil, resp, err
 	}
 
-	return d, resp, nil
+	return d, resp, err
 }
 
 // AddCommitDiscussionNoteOptions represents the available
@@ -1046,7 +1046,7 @@ func (s *DiscussionsService) AddCommitDiscussionNote(pid interface{}, commit str
 		return nil, resp, err
 	}
 
-	return n, resp, nil
+	return n, resp, err
 }
 
 // UpdateCommitDiscussionNoteOptions represents the available
@@ -1086,7 +1086,7 @@ func (s *DiscussionsService) UpdateCommitDiscussionNote(pid interface{}, commit
 		return nil, resp, err
 	}
 
-	return n, resp, nil
+	return n, resp, err
 }
 
 // DeleteCommitDiscussionNote deletes an existing discussion of an commit.
diff --git a/dockerfile_templates.go b/dockerfile_templates.go
index 3608c5a..ba91342 100644
--- a/dockerfile_templates.go
+++ b/dockerfile_templates.go
@@ -68,7 +68,7 @@ func (s *DockerfileTemplatesService) ListTemplates(opt *ListDockerfileTemplatesO
 		return nil, resp, err
 	}
 
-	return gs, resp, nil
+	return gs, resp, err
 }
 
 // GetTemplate get a single Dockerfile template.
@@ -89,5 +89,5 @@ func (s *DockerfileTemplatesService) GetTemplate(key string, options ...RequestO
 		return nil, resp, err
 	}
 
-	return g, resp, nil
+	return g, resp, err
 }
diff --git a/environments.go b/environments.go
index 2044058..cee6aaf 100644
--- a/environments.go
+++ b/environments.go
@@ -208,17 +208,23 @@ func (s *EnvironmentsService) DeleteEnvironment(pid interface{}, environment int
 //
 // GitLab API docs:
 // https://docs.gitlab.com/ee/api/environments.html#stop-an-environment
-func (s *EnvironmentsService) StopEnvironment(pid interface{}, environmentID int, options ...RequestOptionFunc) (*Response, error) {
+func (s *EnvironmentsService) StopEnvironment(pid interface{}, environmentID int, options ...RequestOptionFunc) (*Environment, *Response, error) {
 	project, err := parseID(pid)
 	if err != nil {
-		return nil, err
+		return nil, nil, err
 	}
 	u := fmt.Sprintf("projects/%s/environments/%d/stop", PathEscape(project), environmentID)
 
 	req, err := s.client.NewRequest(http.MethodPost, u, nil, options)
 	if err != nil {
-		return nil, err
+		return nil, nil, err
 	}
 
-	return s.client.Do(req, nil)
+	env := new(Environment)
+	resp, err := s.client.Do(req, env)
+	if err != nil {
+		return nil, resp, err
+	}
+
+	return env, resp, nil
 }
diff --git a/epic_issues.go b/epic_issues.go
index 545357b..9064c89 100644
--- a/epic_issues.go
+++ b/epic_issues.go
@@ -61,7 +61,7 @@ func (s *EpicIssuesService) ListEpicIssues(gid interface{}, epic int, opt *ListO
 		return nil, resp, err
 	}
 
-	return is, resp, nil
+	return is, resp, err
 }
 
 // AssignEpicIssue assigns an existing issue to an epic.
@@ -86,7 +86,7 @@ func (s *EpicIssuesService) AssignEpicIssue(gid interface{}, epic, issue int, op
 		return nil, resp, err
 	}
 
-	return a, resp, nil
+	return a, resp, err
 }
 
 // RemoveEpicIssue removes an issue from an epic.
@@ -111,7 +111,7 @@ func (s *EpicIssuesService) RemoveEpicIssue(gid interface{}, epic, epicIssue int
 		return nil, resp, err
 	}
 
-	return a, resp, nil
+	return a, resp, err
 }
 
 // UpdateEpicIsssueAssignmentOptions describes the UpdateEpicIssueAssignment()
@@ -148,5 +148,5 @@ func (s *EpicIssuesService) UpdateEpicIssueAssignment(gid interface{}, epic, epi
 		return nil, resp, err
 	}
 
-	return is, resp, nil
+	return is, resp, err
 }
diff --git a/epics.go b/epics.go
index 553ea8d..cff3354 100644
--- a/epics.go
+++ b/epics.go
@@ -51,7 +51,7 @@ type Epic struct {
 	Title                   string      `json:"title"`
 	Description             string      `json:"description"`
 	State                   string      `json:"state"`
-	Confidential            bool        `json:"confidential"`
+	Confidential		bool	    `json:"confidential"`
 	WebURL                  string      `json:"web_url"`
 	Author                  *EpicAuthor `json:"author"`
 	StartDate               *ISOTime    `json:"start_date"`
@@ -119,7 +119,7 @@ func (s *EpicsService) ListGroupEpics(gid interface{}, opt *ListGroupEpicsOption
 		return nil, resp, err
 	}
 
-	return es, resp, nil
+	return es, resp, err
 }
 
 // GetEpic gets a single group epic.
@@ -143,7 +143,7 @@ func (s *EpicsService) GetEpic(gid interface{}, epic int, options ...RequestOpti
 		return nil, resp, err
 	}
 
-	return e, resp, nil
+	return e, resp, err
 }
 
 // GetEpicLinks gets all child epics of an epic.
@@ -167,7 +167,7 @@ func (s *EpicsService) GetEpicLinks(gid interface{}, epic int, options ...Reques
 		return nil, resp, err
 	}
 
-	return e, resp, nil
+	return e, resp, err
 }
 
 // CreateEpicOptions represents the available CreateEpic() options.
@@ -204,7 +204,7 @@ func (s *EpicsService) CreateEpic(gid interface{}, opt *CreateEpicOptions, optio
 		return nil, resp, err
 	}
 
-	return e, resp, nil
+	return e, resp, err
 }
 
 // UpdateEpicOptions represents the available UpdateEpic() options.
@@ -244,7 +244,7 @@ func (s *EpicsService) UpdateEpic(gid interface{}, epic int, opt *UpdateEpicOpti
 		return nil, resp, err
 	}
 
-	return e, resp, nil
+	return e, resp, err
 }
 
 // DeleteEpic deletes a single group epic.
diff --git a/error_tracking.go b/error_tracking.go
index fed334a..afa6be4 100644
--- a/error_tracking.go
+++ b/error_tracking.go
@@ -81,7 +81,7 @@ func (s *ErrorTrackingService) GetErrorTrackingSettings(pid interface{}, options
 		return nil, resp, err
 	}
 
-	return ets, resp, nil
+	return ets, resp, err
 }
 
 // EnableDisableErrorTrackingOptions represents the available
@@ -117,7 +117,7 @@ func (s *ErrorTrackingService) EnableDisableErrorTracking(pid interface{}, opt *
 		return nil, resp, err
 	}
 
-	return ets, resp, nil
+	return ets, resp, err
 }
 
 // ListClientKeysOptions represents the available ListClientKeys() options.
@@ -148,7 +148,7 @@ func (s *ErrorTrackingService) ListClientKeys(pid interface{}, opt *ListClientKe
 		return nil, resp, err
 	}
 
-	return cks, resp, nil
+	return cks, resp, err
 }
 
 // CreateClientKey creates a new client key for a project.
@@ -173,7 +173,7 @@ func (s *ErrorTrackingService) CreateClientKey(pid interface{}, options ...Reque
 		return nil, resp, err
 	}
 
-	return ck, resp, nil
+	return ck, resp, err
 }
 
 // DeleteClientKey removes a client key from the project.
diff --git a/event_webhook_types.go b/event_webhook_types.go
index 3899c17..cb1dd5b 100644
--- a/event_webhook_types.go
+++ b/event_webhook_types.go
@@ -784,7 +784,6 @@ type PipelineEvent struct {
 	ObjectKind       string `json:"object_kind"`
 	ObjectAttributes struct {
 		ID             int      `json:"id"`
-		IID            int      `json:"iid"`
 		Ref            string   `json:"ref"`
 		Tag            bool     `json:"tag"`
 		SHA            string   `json:"sha"`
diff --git a/events.go b/events.go
index 879db83..fb77219 100644
--- a/events.go
+++ b/events.go
@@ -102,7 +102,7 @@ func (s *UsersService) ListUserContributionEvents(uid interface{}, opt *ListCont
 		return nil, resp, err
 	}
 
-	return cs, resp, nil
+	return cs, resp, err
 }
 
 // ListCurrentUserContributionEvents gets a list currently authenticated user's events
@@ -120,7 +120,7 @@ func (s *EventsService) ListCurrentUserContributionEvents(opt *ListContributionE
 		return nil, resp, err
 	}
 
-	return cs, resp, nil
+	return cs, resp, err
 }
 
 // ProjectEvent represents a GitLab project event.
@@ -220,5 +220,5 @@ func (s *EventsService) ListProjectVisibleEvents(pid interface{}, opt *ListProje
 		return nil, resp, err
 	}
 
-	return p, resp, nil
+	return p, resp, err
 }
diff --git a/external_status_checks.go b/external_status_checks.go
index dc8e95b..cc2d667 100644
--- a/external_status_checks.go
+++ b/external_status_checks.go
@@ -61,7 +61,7 @@ func (s *ExternalStatusChecksService) ListMergeStatusChecks(pid interface{}, mr
 		return nil, resp, err
 	}
 
-	return mscs, resp, nil
+	return mscs, resp, err
 }
 
 // SetExternalStatusCheckStatusOptions represents the available
@@ -116,7 +116,7 @@ func (s *ExternalStatusChecksService) ListProjectStatusChecks(pid interface{}, o
 		return nil, resp, err
 	}
 
-	return pscs, resp, nil
+	return pscs, resp, err
 }
 
 // CreateExternalStatusCheckOptions represents the available
diff --git a/feature_flags.go b/feature_flags.go
index 8bb847e..180f453 100644
--- a/feature_flags.go
+++ b/feature_flags.go
@@ -66,7 +66,7 @@ func (s *FeaturesService) ListFeatures(options ...RequestOptionFunc) ([]*Feature
 	if err != nil {
 		return nil, resp, err
 	}
-	return f, resp, nil
+	return f, resp, err
 }
 
 // SetFeatureFlag sets or creates a feature flag gate
@@ -92,5 +92,5 @@ func (s *FeaturesService) SetFeatureFlag(name string, value interface{}, options
 	if err != nil {
 		return nil, resp, err
 	}
-	return f, resp, nil
+	return f, resp, err
 }
diff --git a/freeze_periods.go b/freeze_periods.go
index 3cbfba8..8e1a64d 100644
--- a/freeze_periods.go
+++ b/freeze_periods.go
@@ -72,7 +72,7 @@ func (s *FreezePeriodsService) ListFreezePeriods(pid interface{}, opt *ListFreez
 		return nil, resp, err
 	}
 
-	return fp, resp, nil
+	return fp, resp, err
 }
 
 // GetFreezePeriod gets a specific freeze period for a project.
@@ -97,7 +97,7 @@ func (s *FreezePeriodsService) GetFreezePeriod(pid interface{}, freezePeriod int
 		return nil, resp, err
 	}
 
-	return fp, resp, nil
+	return fp, resp, err
 }
 
 // CreateFreezePeriodOptions represents the available CreateFreezePeriodOptions()
@@ -133,7 +133,7 @@ func (s *FreezePeriodsService) CreateFreezePeriodOptions(pid interface{}, opt *C
 		return nil, resp, err
 	}
 
-	return fp, resp, nil
+	return fp, resp, err
 }
 
 // UpdateFreezePeriodOptions represents the available UpdateFreezePeriodOptions()
@@ -169,7 +169,7 @@ func (s *FreezePeriodsService) UpdateFreezePeriodOptions(pid interface{}, freeze
 		return nil, resp, err
 	}
 
-	return fp, resp, nil
+	return fp, resp, err
 }
 
 // DeleteFreezePeriod removes a freeze period from a project. This is an
diff --git a/generic_packages.go b/generic_packages.go
index 4c32eed..95f382a 100644
--- a/generic_packages.go
+++ b/generic_packages.go
@@ -123,7 +123,7 @@ func (s *GenericPackagesService) PublishPackageFile(pid interface{}, packageName
 		return nil, resp, err
 	}
 
-	return f, resp, nil
+	return f, resp, err
 }
 
 // DownloadPackageFile allows you to download the package file.
diff --git a/geo_nodes.go b/geo_nodes.go
index 47ac583..fa7c254 100644
--- a/geo_nodes.go
+++ b/geo_nodes.go
@@ -101,7 +101,7 @@ func (s *GeoNodesService) CreateGeoNode(opt *CreateGeoNodesOptions, options ...R
 		return nil, resp, err
 	}
 
-	return g, resp, nil
+	return g, resp, err
 }
 
 // ListGeoNodesOptions represents the available ListGeoNodes() options.
@@ -126,7 +126,7 @@ func (s *GeoNodesService) ListGeoNodes(opt *ListGeoNodesOptions, options ...Requ
 		return nil, resp, err
 	}
 
-	return gs, resp, nil
+	return gs, resp, err
 }
 
 // GetGeoNode gets a specific geo node.
@@ -147,7 +147,7 @@ func (s *GeoNodesService) GetGeoNode(id int, options ...RequestOptionFunc) (*Geo
 		return nil, resp, err
 	}
 
-	return g, resp, nil
+	return g, resp, err
 }
 
 // UpdateGeoNodesOptions represents the available EditGeoNode() options.
@@ -189,7 +189,7 @@ func (s *GeoNodesService) EditGeoNode(id int, opt *UpdateGeoNodesOptions, option
 		return nil, resp, err
 	}
 
-	return g, resp, nil
+	return g, resp, err
 }
 
 // DeleteGeoNode removes the Geo node.
@@ -225,7 +225,7 @@ func (s *GeoNodesService) RepairGeoNode(id int, options ...RequestOptionFunc) (*
 		return nil, resp, err
 	}
 
-	return g, resp, nil
+	return g, resp, err
 }
 
 // GeoNodeStatus represents the status of Geo Node.
@@ -408,7 +408,7 @@ func (s *GeoNodesService) RetrieveStatusOfAllGeoNodes(options ...RequestOptionFu
 		return nil, resp, err
 	}
 
-	return gnss, resp, nil
+	return gnss, resp, err
 }
 
 // RetrieveStatusOfGeoNode get the of status of a specific Geo Nodes.
@@ -429,5 +429,5 @@ func (s *GeoNodesService) RetrieveStatusOfGeoNode(id int, options ...RequestOpti
 		return nil, resp, err
 	}
 
-	return gns, resp, nil
+	return gns, resp, err
 }
diff --git a/gitignore_templates.go b/gitignore_templates.go
index 83d5872..36b1399 100644
--- a/gitignore_templates.go
+++ b/gitignore_templates.go
@@ -68,7 +68,7 @@ func (s *GitIgnoreTemplatesService) ListTemplates(opt *ListTemplatesOptions, opt
 		return nil, resp, err
 	}
 
-	return gs, resp, nil
+	return gs, resp, err
 }
 
 // GetTemplate get a git ignore template
@@ -89,5 +89,5 @@ func (s *GitIgnoreTemplatesService) GetTemplate(key string, options ...RequestOp
 		return nil, resp, err
 	}
 
-	return g, resp, nil
+	return g, resp, err
 }
diff --git a/gitlab.go b/gitlab.go
index dbd18ef..81cf3ff 100644
--- a/gitlab.go
+++ b/gitlab.go
@@ -821,7 +821,7 @@ func (c *Client) Do(req *retryablehttp.Request, v interface{}) (*Response, error
 		}
 	}
 
-	return response, nil
+	return response, err
 }
 
 func (c *Client) requestOAuthToken(ctx context.Context, token string) (string, error) {
diff --git a/group_access_tokens.go b/group_access_tokens.go
index 3d42ab5..94c53fd 100644
--- a/group_access_tokens.go
+++ b/group_access_tokens.go
@@ -80,7 +80,7 @@ func (s *GroupAccessTokensService) ListGroupAccessTokens(gid interface{}, opt *L
 		return nil, resp, err
 	}
 
-	return gats, resp, nil
+	return gats, resp, err
 }
 
 // GetGroupAccessToken gets a single group access tokens in a group.
@@ -105,7 +105,7 @@ func (s *GroupAccessTokensService) GetGroupAccessToken(gid interface{}, id int,
 		return nil, resp, err
 	}
 
-	return gat, resp, nil
+	return gat, resp, err
 }
 
 // CreateGroupAccessTokenOptions represents the available CreateVariable()
@@ -142,7 +142,7 @@ func (s *GroupAccessTokensService) CreateGroupAccessToken(gid interface{}, opt *
 		return nil, resp, err
 	}
 
-	return pat, resp, nil
+	return pat, resp, err
 }
 
 // RevokeGroupAccessToken revokes a group access token.
diff --git a/group_badges.go b/group_badges.go
index 1ae3ebc..7207fe7 100644
--- a/group_badges.go
+++ b/group_badges.go
@@ -79,7 +79,7 @@ func (s *GroupBadgesService) ListGroupBadges(gid interface{}, opt *ListGroupBadg
 		return nil, resp, err
 	}
 
-	return gb, resp, nil
+	return gb, resp, err
 }
 
 // GetGroupBadge gets a group badge.
@@ -104,7 +104,7 @@ func (s *GroupBadgesService) GetGroupBadge(gid interface{}, badge int, options .
 		return nil, resp, err
 	}
 
-	return gb, resp, nil
+	return gb, resp, err
 }
 
 // AddGroupBadgeOptions represents the available AddGroupBadge() options.
@@ -138,7 +138,7 @@ func (s *GroupBadgesService) AddGroupBadge(gid interface{}, opt *AddGroupBadgeOp
 		return nil, resp, err
 	}
 
-	return gb, resp, nil
+	return gb, resp, err
 }
 
 // EditGroupBadgeOptions represents the available EditGroupBadge() options.
@@ -172,7 +172,7 @@ func (s *GroupBadgesService) EditGroupBadge(gid interface{}, badge int, opt *Edi
 		return nil, resp, err
 	}
 
-	return gb, resp, nil
+	return gb, resp, err
 }
 
 // DeleteGroupBadge removes a badge from a group.
@@ -226,5 +226,5 @@ func (s *GroupBadgesService) PreviewGroupBadge(gid interface{}, opt *GroupBadgeP
 		return nil, resp, err
 	}
 
-	return gb, resp, nil
+	return gb, resp, err
 }
diff --git a/group_boards.go b/group_boards.go
index 645e7ee..b751086 100644
--- a/group_boards.go
+++ b/group_boards.go
@@ -75,7 +75,7 @@ func (s *GroupIssueBoardsService) ListGroupIssueBoards(gid interface{}, opt *Lis
 		return nil, resp, err
 	}
 
-	return gs, resp, nil
+	return gs, resp, err
 }
 
 // CreateGroupIssueBoardOptions represents the available
@@ -109,7 +109,7 @@ func (s *GroupIssueBoardsService) CreateGroupIssueBoard(gid interface{}, opt *Cr
 		return nil, resp, err
 	}
 
-	return gib, resp, nil
+	return gib, resp, err
 }
 
 // GetGroupIssueBoard gets a single issue board of a group.
@@ -134,7 +134,7 @@ func (s *GroupIssueBoardsService) GetGroupIssueBoard(gid interface{}, board int,
 		return nil, resp, err
 	}
 
-	return gib, resp, nil
+	return gib, resp, err
 }
 
 // UpdateGroupIssueBoardOptions represents a group issue board.
@@ -171,7 +171,7 @@ func (s *GroupIssueBoardsService) UpdateIssueBoard(gid interface{}, board int, o
 		return nil, resp, err
 	}
 
-	return gib, resp, nil
+	return gib, resp, err
 }
 
 // DeleteIssueBoard delete a single issue board of a group.
@@ -222,7 +222,7 @@ func (s *GroupIssueBoardsService) ListGroupIssueBoardLists(gid interface{}, boar
 		return nil, resp, err
 	}
 
-	return gbl, resp, nil
+	return gbl, resp, err
 }
 
 // GetGroupIssueBoardList gets a single issue board list.
@@ -251,7 +251,7 @@ func (s *GroupIssueBoardsService) GetGroupIssueBoardList(gid interface{}, board,
 		return nil, resp, err
 	}
 
-	return gbl, resp, nil
+	return gbl, resp, err
 }
 
 // CreateGroupIssueBoardListOptions represents the available
@@ -285,7 +285,7 @@ func (s *GroupIssueBoardsService) CreateGroupIssueBoardList(gid interface{}, boa
 		return nil, resp, err
 	}
 
-	return gbl, resp, nil
+	return gbl, resp, err
 }
 
 // UpdateGroupIssueBoardListOptions represents the available
@@ -324,7 +324,7 @@ func (s *GroupIssueBoardsService) UpdateIssueBoardList(gid interface{}, board, l
 		return nil, resp, err
 	}
 
-	return gbl, resp, nil
+	return gbl, resp, err
 }
 
 // DeleteGroupIssueBoardList soft deletes a group issue board list.
diff --git a/group_clusters.go b/group_clusters.go
index f459e1c..f2b9e2a 100644
--- a/group_clusters.go
+++ b/group_clusters.go
@@ -77,7 +77,7 @@ func (s *GroupClustersService) ListClusters(pid interface{}, options ...RequestO
 		return nil, resp, err
 	}
 
-	return pcs, resp, nil
+	return pcs, resp, err
 }
 
 // GetCluster gets a cluster.
@@ -102,7 +102,7 @@ func (s *GroupClustersService) GetCluster(pid interface{}, cluster int, options
 		return nil, resp, err
 	}
 
-	return gc, resp, nil
+	return gc, resp, err
 }
 
 // AddGroupClusterOptions represents the available AddCluster() options.
@@ -150,7 +150,7 @@ func (s *GroupClustersService) AddCluster(pid interface{}, opt *AddGroupClusterO
 		return nil, resp, err
 	}
 
-	return gc, resp, nil
+	return gc, resp, err
 }
 
 // EditGroupClusterOptions represents the available EditCluster() options.
@@ -194,7 +194,7 @@ func (s *GroupClustersService) EditCluster(pid interface{}, cluster int, opt *Ed
 		return nil, resp, err
 	}
 
-	return gc, resp, nil
+	return gc, resp, err
 }
 
 // DeleteCluster deletes an existing group cluster.
diff --git a/group_hooks.go b/group_hooks.go
index ccfed12..a408948 100644
--- a/group_hooks.go
+++ b/group_hooks.go
@@ -73,7 +73,7 @@ func (s *GroupsService) ListGroupHooks(gid interface{}, opt *ListGroupHooksOptio
 		return nil, resp, err
 	}
 
-	return gh, resp, nil
+	return gh, resp, err
 }
 
 // GetGroupHook gets a specific hook for a group.
@@ -98,7 +98,7 @@ func (s *GroupsService) GetGroupHook(pid interface{}, hook int, options ...Reque
 		return nil, resp, err
 	}
 
-	return gh, resp, nil
+	return gh, resp, err
 }
 
 // AddGroupHookOptions represents the available AddGroupHook() options.
@@ -145,7 +145,7 @@ func (s *GroupsService) AddGroupHook(gid interface{}, opt *AddGroupHookOptions,
 		return nil, resp, err
 	}
 
-	return gh, resp, nil
+	return gh, resp, err
 }
 
 // EditGroupHookOptions represents the available EditGroupHook() options.
@@ -194,7 +194,7 @@ func (s *GroupsService) EditGroupHook(pid interface{}, hook int, opt *EditGroupH
 		return nil, resp, err
 	}
 
-	return gh, resp, nil
+	return gh, resp, err
 }
 
 // DeleteGroupHook removes a hook from a group. This is an idempotent
diff --git a/group_iterations.go b/group_iterations.go
index c77d633..a642091 100644
--- a/group_iterations.go
+++ b/group_iterations.go
@@ -86,5 +86,5 @@ func (s *GroupIterationsService) ListGroupIterations(gid interface{}, opt *ListG
 		return nil, nil, err
 	}
 
-	return gis, resp, nil
+	return gis, resp, err
 }
diff --git a/group_labels.go b/group_labels.go
index d19e3ed..d7ccd44 100644
--- a/group_labels.go
+++ b/group_labels.go
@@ -72,7 +72,7 @@ func (s *GroupLabelsService) ListGroupLabels(gid interface{}, opt *ListGroupLabe
 		return nil, resp, err
 	}
 
-	return l, resp, nil
+	return l, resp, err
 }
 
 // GetGroupLabel get a single label for a given group.
@@ -101,7 +101,7 @@ func (s *GroupLabelsService) GetGroupLabel(gid interface{}, labelID interface{},
 		return nil, resp, err
 	}
 
-	return l, resp, nil
+	return l, resp, err
 }
 
 // CreateGroupLabelOptions represents the available CreateGroupLabel() options.
@@ -133,7 +133,7 @@ func (s *GroupLabelsService) CreateGroupLabel(gid interface{}, opt *CreateGroupL
 		return nil, resp, err
 	}
 
-	return l, resp, nil
+	return l, resp, err
 }
 
 // DeleteGroupLabelOptions represents the available DeleteGroupLabel() options.
@@ -189,7 +189,7 @@ func (s *GroupLabelsService) UpdateGroupLabel(gid interface{}, opt *UpdateGroupL
 		return nil, resp, err
 	}
 
-	return l, resp, nil
+	return l, resp, err
 }
 
 // SubscribeToGroupLabel subscribes the authenticated user to a label to receive
@@ -220,7 +220,7 @@ func (s *GroupLabelsService) SubscribeToGroupLabel(gid interface{}, labelID inte
 		return nil, resp, err
 	}
 
-	return l, resp, nil
+	return l, resp, err
 }
 
 // UnsubscribeFromGroupLabel unsubscribes the authenticated user from a label to not
diff --git a/group_members.go b/group_members.go
index c508adb..4a169cd 100644
--- a/group_members.go
+++ b/group_members.go
@@ -92,7 +92,7 @@ func (s *GroupsService) ListGroupMembers(gid interface{}, opt *ListGroupMembersO
 		return nil, resp, err
 	}
 
-	return gm, resp, nil
+	return gm, resp, err
 }
 
 // ListAllGroupMembers get a list of group members viewable by the authenticated
@@ -118,7 +118,7 @@ func (s *GroupsService) ListAllGroupMembers(gid interface{}, opt *ListGroupMembe
 		return nil, resp, err
 	}
 
-	return gm, resp, nil
+	return gm, resp, err
 }
 
 // AddGroupMemberOptions represents the available AddGroupMember() options.
@@ -153,7 +153,7 @@ func (s *GroupMembersService) GetGroupMember(gid interface{}, user int, options
 		return nil, resp, err
 	}
 
-	return gm, resp, nil
+	return gm, resp, err
 }
 
 // BillableGroupMember represents a GitLab billable group member.
@@ -208,7 +208,7 @@ func (s *GroupsService) ListBillableGroupMembers(gid interface{}, opt *ListBilla
 		return nil, resp, err
 	}
 
-	return bgm, resp, nil
+	return bgm, resp, err
 }
 
 // RemoveBillableGroupMember removes a given group members that count as billable.
@@ -252,7 +252,7 @@ func (s *GroupMembersService) AddGroupMember(gid interface{}, opt *AddGroupMembe
 		return nil, resp, err
 	}
 
-	return gm, resp, nil
+	return gm, resp, err
 }
 
 // ShareWithGroup shares a group with the group.
@@ -277,7 +277,7 @@ func (s *GroupMembersService) ShareWithGroup(gid interface{}, opt *ShareWithGrou
 		return nil, resp, err
 	}
 
-	return g, resp, nil
+	return g, resp, err
 }
 
 // DeleteShareWithGroup allows to unshare a group from a group.
@@ -331,7 +331,7 @@ func (s *GroupMembersService) EditGroupMember(gid interface{}, user int, opt *Ed
 		return nil, resp, err
 	}
 
-	return gm, resp, nil
+	return gm, resp, err
 }
 
 // RemoveGroupMemberOptions represents the available options to remove a group member.
diff --git a/group_milestones.go b/group_milestones.go
index 60aa2e9..0f64fca 100644
--- a/group_milestones.go
+++ b/group_milestones.go
@@ -87,7 +87,7 @@ func (s *GroupMilestonesService) ListGroupMilestones(gid interface{}, opt *ListG
 		return nil, resp, err
 	}
 
-	return m, resp, nil
+	return m, resp, err
 }
 
 // GetGroupMilestone gets a single group milestone.
@@ -112,7 +112,7 @@ func (s *GroupMilestonesService) GetGroupMilestone(gid interface{}, milestone in
 		return nil, resp, err
 	}
 
-	return m, resp, nil
+	return m, resp, err
 }
 
 // CreateGroupMilestoneOptions represents the available CreateGroupMilestone() options.
@@ -148,7 +148,7 @@ func (s *GroupMilestonesService) CreateGroupMilestone(gid interface{}, opt *Crea
 		return nil, resp, err
 	}
 
-	return m, resp, nil
+	return m, resp, err
 }
 
 // UpdateGroupMilestoneOptions represents the available UpdateGroupMilestone() options.
@@ -185,7 +185,7 @@ func (s *GroupMilestonesService) UpdateGroupMilestone(gid interface{}, milestone
 		return nil, resp, err
 	}
 
-	return m, resp, nil
+	return m, resp, err
 }
 
 // GetGroupMilestoneIssuesOptions represents the available GetGroupMilestoneIssues() options.
@@ -216,7 +216,7 @@ func (s *GroupMilestonesService) GetGroupMilestoneIssues(gid interface{}, milest
 		return nil, resp, err
 	}
 
-	return i, resp, nil
+	return i, resp, err
 }
 
 // GetGroupMilestoneMergeRequestsOptions represents the available
@@ -249,7 +249,7 @@ func (s *GroupMilestonesService) GetGroupMilestoneMergeRequests(gid interface{},
 		return nil, resp, err
 	}
 
-	return mr, resp, nil
+	return mr, resp, err
 }
 
 // BurndownChartEvent reprensents a burnout chart event
@@ -292,5 +292,5 @@ func (s *GroupMilestonesService) GetGroupMilestoneBurndownChartEvents(gid interf
 		return nil, resp, err
 	}
 
-	return be, resp, nil
+	return be, resp, err
 }
diff --git a/group_variables.go b/group_variables.go
index ead4d0a..1d2c69f 100644
--- a/group_variables.go
+++ b/group_variables.go
@@ -78,7 +78,7 @@ func (s *GroupVariablesService) ListVariables(gid interface{}, opt *ListGroupVar
 		return nil, resp, err
 	}
 
-	return vs, resp, nil
+	return vs, resp, err
 }
 
 // GetVariable gets a variable.
@@ -103,7 +103,7 @@ func (s *GroupVariablesService) GetVariable(gid interface{}, key string, options
 		return nil, resp, err
 	}
 
-	return v, resp, nil
+	return v, resp, err
 }
 
 // CreateGroupVariableOptions represents the available CreateVariable()
@@ -143,7 +143,7 @@ func (s *GroupVariablesService) CreateVariable(gid interface{}, opt *CreateGroup
 		return nil, resp, err
 	}
 
-	return v, resp, nil
+	return v, resp, err
 }
 
 // UpdateGroupVariableOptions represents the available UpdateVariable()
@@ -183,7 +183,7 @@ func (s *GroupVariablesService) UpdateVariable(gid interface{}, key string, opt
 		return nil, resp, err
 	}
 
-	return v, resp, nil
+	return v, resp, err
 }
 
 // RemoveVariable removes a group's variable.
diff --git a/group_wikis.go b/group_wikis.go
index 4693965..ecf9c27 100644
--- a/group_wikis.go
+++ b/group_wikis.go
@@ -75,7 +75,7 @@ func (s *GroupWikisService) ListGroupWikis(gid interface{}, opt *ListGroupWikisO
 		return nil, resp, err
 	}
 
-	return gws, resp, nil
+	return gws, resp, err
 }
 
 // GetGroupWikiPageOptions represents options to GetGroupWikiPage
@@ -109,7 +109,7 @@ func (s *GroupWikisService) GetGroupWikiPage(gid interface{}, slug string, opt *
 		return nil, resp, err
 	}
 
-	return gw, resp, nil
+	return gw, resp, err
 }
 
 // CreateGroupWikiPageOptions represents options to CreateGroupWikiPage.
@@ -145,7 +145,7 @@ func (s *GroupWikisService) CreateGroupWikiPage(gid interface{}, opt *CreateGrou
 		return nil, resp, err
 	}
 
-	return w, resp, nil
+	return w, resp, err
 }
 
 // EditGroupWikiPageOptions represents options to EditGroupWikiPage.
@@ -181,7 +181,7 @@ func (s *GroupWikisService) EditGroupWikiPage(gid interface{}, slug string, opt
 		return nil, resp, err
 	}
 
-	return w, resp, nil
+	return w, resp, err
 }
 
 // DeleteGroupWikiPage deletes a wiki page with a given slug.
diff --git a/groups.go b/groups.go
index ceff074..7532387 100644
--- a/groups.go
+++ b/groups.go
@@ -155,7 +155,7 @@ func (s *GroupsService) ListGroups(opt *ListGroupsOptions, options ...RequestOpt
 		return nil, resp, err
 	}
 
-	return gs, resp, nil
+	return gs, resp, err
 }
 
 // ListSubGroupsOptions represents the available ListSubGroups() options.
@@ -186,7 +186,7 @@ func (s *GroupsService) ListSubGroups(gid interface{}, opt *ListSubGroupsOptions
 		return nil, resp, err
 	}
 
-	return gs, resp, nil
+	return gs, resp, err
 }
 
 // ListDescendantGroupsOptions represents the available ListDescendantGroups()
@@ -218,7 +218,7 @@ func (s *GroupsService) ListDescendantGroups(gid interface{}, opt *ListDescendan
 		return nil, resp, err
 	}
 
-	return gs, resp, nil
+	return gs, resp, err
 }
 
 // ListGroupProjectsOptions represents the available ListGroup() options.
@@ -267,7 +267,7 @@ func (s *GroupsService) ListGroupProjects(gid interface{}, opt *ListGroupProject
 		return nil, resp, err
 	}
 
-	return ps, resp, nil
+	return ps, resp, err
 }
 
 // GetGroupOptions represents the available GetGroup() options.
@@ -300,7 +300,7 @@ func (s *GroupsService) GetGroup(gid interface{}, opt *GetGroupOptions, options
 		return nil, resp, err
 	}
 
-	return g, resp, nil
+	return g, resp, err
 }
 
 // DownloadAvatar downloads a group avatar.
@@ -386,7 +386,7 @@ func (s *GroupsService) CreateGroup(opt *CreateGroupOptions, options ...RequestO
 		return nil, resp, err
 	}
 
-	return g, resp, nil
+	return g, resp, err
 }
 
 // TransferGroup transfers a project to the Group namespace. Available only
@@ -416,7 +416,7 @@ func (s *GroupsService) TransferGroup(gid interface{}, pid interface{}, options
 		return nil, resp, err
 	}
 
-	return g, resp, nil
+	return g, resp, err
 }
 
 // TransferSubGroupOptions represents the available TransferSubGroup() options.
@@ -450,7 +450,7 @@ func (s *GroupsService) TransferSubGroup(gid interface{}, opt *TransferSubGroupO
 		return nil, resp, err
 	}
 
-	return g, resp, nil
+	return g, resp, err
 }
 
 // UpdateGroupOptions represents the available UpdateGroup() options.
@@ -519,7 +519,7 @@ func (s *GroupsService) UpdateGroup(gid interface{}, opt *UpdateGroupOptions, op
 		return nil, resp, err
 	}
 
-	return g, resp, nil
+	return g, resp, err
 }
 
 // UploadAvatar uploads a group avatar.
@@ -552,7 +552,7 @@ func (s *GroupsService) UploadAvatar(gid interface{}, avatar io.Reader, filename
 		return nil, resp, err
 	}
 
-	return g, resp, nil
+	return g, resp, err
 }
 
 // DeleteGroup removes group with all projects inside.
@@ -618,7 +618,7 @@ func (s *GroupsService) SearchGroup(query string, options ...RequestOptionFunc)
 		return nil, resp, err
 	}
 
-	return gs, resp, nil
+	return gs, resp, err
 }
 
 // ListProvisionedUsersOptions represents the available ListProvisionedUsers()
@@ -658,7 +658,7 @@ func (s *GroupsService) ListProvisionedUsers(gid interface{}, opt *ListProvision
 		return nil, resp, err
 	}
 
-	return us, resp, nil
+	return us, resp, err
 }
 
 // ListGroupLDAPLinks lists the group's LDAP links. Available only for users who
@@ -731,7 +731,7 @@ func (s *GroupsService) AddGroupLDAPLink(gid interface{}, opt *AddGroupLDAPLinkO
 		return nil, resp, err
 	}
 
-	return gl, resp, nil
+	return gl, resp, err
 }
 
 // DeleteGroupLDAPLink deletes a group LDAP link. Available only for users who
@@ -883,7 +883,7 @@ func (s *GroupsService) AddGroupSAMLLink(gid interface{}, opt *AddGroupSAMLLinkO
 		return nil, resp, err
 	}
 
-	return gl, resp, nil
+	return gl, resp, err
 }
 
 // DeleteGroupSAMLLink deletes a group SAML link. Available only for users who
@@ -938,7 +938,7 @@ func (s *GroupsService) ShareGroupWithGroup(gid interface{}, opt *ShareGroupWith
 		return nil, resp, err
 	}
 
-	return g, resp, nil
+	return g, resp, err
 }
 
 // UnshareGroupFromGroup unshares a group from another group.
@@ -1002,7 +1002,7 @@ func (s *GroupsService) GetGroupPushRules(gid interface{}, options ...RequestOpt
 		return nil, resp, err
 	}
 
-	return gpr, resp, nil
+	return gpr, resp, err
 }
 
 // AddGroupPushRuleOptions represents the available AddGroupPushRule()
@@ -1046,7 +1046,7 @@ func (s *GroupsService) AddGroupPushRule(gid interface{}, opt *AddGroupPushRuleO
 		return nil, resp, err
 	}
 
-	return gpr, resp, nil
+	return gpr, resp, err
 }
 
 // EditGroupPushRuleOptions represents the available EditGroupPushRule()
@@ -1090,7 +1090,7 @@ func (s *GroupsService) EditGroupPushRule(gid interface{}, opt *EditGroupPushRul
 		return nil, resp, err
 	}
 
-	return gpr, resp, nil
+	return gpr, resp, err
 }
 
 // DeleteGroupPushRule deletes the push rules of a group.
diff --git a/instance_clusters.go b/instance_clusters.go
index 0760d11..0014653 100644
--- a/instance_clusters.go
+++ b/instance_clusters.go
@@ -71,7 +71,7 @@ func (s *InstanceClustersService) ListClusters(options ...RequestOptionFunc) ([]
 		return nil, resp, err
 	}
 
-	return ics, resp, nil
+	return ics, resp, err
 }
 
 // GetCluster gets an instance cluster.
@@ -92,7 +92,7 @@ func (s *InstanceClustersService) GetCluster(cluster int, options ...RequestOpti
 		return nil, resp, err
 	}
 
-	return ic, resp, nil
+	return ic, resp, err
 }
 
 // AddCluster adds an existing cluster to the instance.
@@ -113,7 +113,7 @@ func (s *InstanceClustersService) AddCluster(opt *AddClusterOptions, options ...
 		return nil, resp, err
 	}
 
-	return ic, resp, nil
+	return ic, resp, err
 }
 
 // EditCluster updates an existing instance cluster.
@@ -134,7 +134,7 @@ func (s *InstanceClustersService) EditCluster(cluster int, opt *EditClusterOptio
 		return nil, resp, err
 	}
 
-	return ic, resp, nil
+	return ic, resp, err
 }
 
 // DeleteCluster deletes an existing instance cluster.
diff --git a/instance_variables.go b/instance_variables.go
index c376fd5..79b6304 100644
--- a/instance_variables.go
+++ b/instance_variables.go
@@ -73,7 +73,7 @@ func (s *InstanceVariablesService) ListVariables(opt *ListInstanceVariablesOptio
 		return nil, resp, err
 	}
 
-	return vs, resp, nil
+	return vs, resp, err
 }
 
 // GetVariable gets a variable.
@@ -94,7 +94,7 @@ func (s *InstanceVariablesService) GetVariable(key string, options ...RequestOpt
 		return nil, resp, err
 	}
 
-	return v, resp, nil
+	return v, resp, err
 }
 
 // CreateInstanceVariableOptions represents the available CreateVariable()
@@ -129,7 +129,7 @@ func (s *InstanceVariablesService) CreateVariable(opt *CreateInstanceVariableOpt
 		return nil, resp, err
 	}
 
-	return v, resp, nil
+	return v, resp, err
 }
 
 // UpdateInstanceVariableOptions represents the available UpdateVariable()
@@ -164,7 +164,7 @@ func (s *InstanceVariablesService) UpdateVariable(key string, opt *UpdateInstanc
 		return nil, resp, err
 	}
 
-	return v, resp, nil
+	return v, resp, err
 }
 
 // RemoveVariable removes an instance level CI variable.
diff --git a/invites.go b/invites.go
index 62bad26..c261fde 100644
--- a/invites.go
+++ b/invites.go
@@ -75,7 +75,7 @@ func (s *InvitesService) ListPendingGroupInvitations(gid interface{}, opt *ListP
 		return nil, resp, err
 	}
 
-	return pis, resp, nil
+	return pis, resp, err
 }
 
 // ListPendingProjectInvitations gets a list of invited project members.
@@ -100,7 +100,7 @@ func (s *InvitesService) ListPendingProjectInvitations(pid interface{}, opt *Lis
 		return nil, resp, err
 	}
 
-	return pis, resp, nil
+	return pis, resp, err
 }
 
 // InvitesOptions represents the available GroupInvites() and ProjectInvites()
@@ -147,7 +147,7 @@ func (s *InvitesService) GroupInvites(gid interface{}, opt *InvitesOptions, opti
 		return nil, resp, err
 	}
 
-	return ir, resp, nil
+	return ir, resp, err
 }
 
 // ProjectInvites invites new users by email to join a project.
@@ -172,5 +172,5 @@ func (s *InvitesService) ProjectInvites(pid interface{}, opt *InvitesOptions, op
 		return nil, resp, err
 	}
 
-	return ir, resp, nil
+	return ir, resp, err
 }
diff --git a/issue_links.go b/issue_links.go
index d5fcae0..d155cc1 100644
--- a/issue_links.go
+++ b/issue_links.go
@@ -94,7 +94,7 @@ func (s *IssueLinksService) ListIssueRelations(pid interface{}, issue int, optio
 		return nil, resp, err
 	}
 
-	return is, resp, nil
+	return is, resp, err
 }
 
 // GetIssueLink gets a specific issue link.
@@ -119,7 +119,7 @@ func (s *IssueLinksService) GetIssueLink(pid interface{}, issue, issueLink int,
 		return nil, resp, err
 	}
 
-	return il, resp, nil
+	return il, resp, err
 }
 
 // CreateIssueLinkOptions represents the available CreateIssueLink() options.
@@ -154,7 +154,7 @@ func (s *IssueLinksService) CreateIssueLink(pid interface{}, issue int, opt *Cre
 		return nil, resp, err
 	}
 
-	return i, resp, nil
+	return i, resp, err
 }
 
 // DeleteIssueLink deletes an issue link, thus removes the two-way relationship.
@@ -182,5 +182,5 @@ func (s *IssueLinksService) DeleteIssueLink(pid interface{}, issue, issueLink in
 		return nil, resp, err
 	}
 
-	return il, resp, nil
+	return il, resp, err
 }
diff --git a/issues.go b/issues.go
index 4584929..4d06fd3 100644
--- a/issues.go
+++ b/issues.go
@@ -258,7 +258,7 @@ func (s *IssuesService) ListIssues(opt *ListIssuesOptions, options ...RequestOpt
 		return nil, resp, err
 	}
 
-	return i, resp, nil
+	return i, resp, err
 }
 
 // ListGroupIssuesOptions represents the available ListGroupIssues() options.
@@ -322,7 +322,7 @@ func (s *IssuesService) ListGroupIssues(pid interface{}, opt *ListGroupIssuesOpt
 		return nil, resp, err
 	}
 
-	return i, resp, nil
+	return i, resp, err
 }
 
 // ListProjectIssuesOptions represents the available ListProjectIssues() options.
@@ -385,7 +385,7 @@ func (s *IssuesService) ListProjectIssues(pid interface{}, opt *ListProjectIssue
 		return nil, resp, err
 	}
 
-	return i, resp, nil
+	return i, resp, err
 }
 
 // GetIssueByID gets a single issue.
@@ -405,7 +405,7 @@ func (s *IssuesService) GetIssueByID(issue int, options ...RequestOptionFunc) (*
 		return nil, resp, err
 	}
 
-	return i, resp, nil
+	return i, resp, err
 }
 
 // GetIssue gets a single project issue.
@@ -429,7 +429,7 @@ func (s *IssuesService) GetIssue(pid interface{}, issue int, options ...RequestO
 		return nil, resp, err
 	}
 
-	return i, resp, nil
+	return i, resp, err
 }
 
 // CreateIssueOptions represents the available CreateIssue() options.
@@ -472,7 +472,7 @@ func (s *IssuesService) CreateIssue(pid interface{}, opt *CreateIssueOptions, op
 		return nil, resp, err
 	}
 
-	return i, resp, nil
+	return i, resp, err
 }
 
 // UpdateIssueOptions represents the available UpdateIssue() options.
@@ -517,7 +517,7 @@ func (s *IssuesService) UpdateIssue(pid interface{}, issue int, opt *UpdateIssue
 		return nil, resp, err
 	}
 
-	return i, resp, nil
+	return i, resp, err
 }
 
 // DeleteIssue deletes a single project issue.
@@ -567,7 +567,7 @@ func (s *IssuesService) MoveIssue(pid interface{}, issue int, opt *MoveIssueOpti
 		return nil, resp, err
 	}
 
-	return i, resp, nil
+	return i, resp, err
 }
 
 // SubscribeToIssue subscribes the authenticated user to the given issue to
@@ -594,7 +594,7 @@ func (s *IssuesService) SubscribeToIssue(pid interface{}, issue int, options ...
 		return nil, resp, err
 	}
 
-	return i, resp, nil
+	return i, resp, err
 }
 
 // UnsubscribeFromIssue unsubscribes the authenticated user from the given
@@ -621,7 +621,7 @@ func (s *IssuesService) UnsubscribeFromIssue(pid interface{}, issue int, options
 		return nil, resp, err
 	}
 
-	return i, resp, nil
+	return i, resp, err
 }
 
 // CreateTodo creates a todo for the current user for an issue.
@@ -648,7 +648,7 @@ func (s *IssuesService) CreateTodo(pid interface{}, issue int, options ...Reques
 		return nil, resp, err
 	}
 
-	return t, resp, nil
+	return t, resp, err
 }
 
 // ListMergeRequestsClosingIssueOptions represents the available
@@ -681,7 +681,7 @@ func (s *IssuesService) ListMergeRequestsClosingIssue(pid interface{}, issue int
 		return nil, resp, err
 	}
 
-	return m, resp, nil
+	return m, resp, err
 }
 
 // ListMergeRequestsRelatedToIssueOptions represents the available
@@ -717,7 +717,7 @@ func (s *IssuesService) ListMergeRequestsRelatedToIssue(pid interface{}, issue i
 		return nil, resp, err
 	}
 
-	return m, resp, nil
+	return m, resp, err
 }
 
 // SetTimeEstimate sets the time estimate for a single project issue.
@@ -782,5 +782,5 @@ func (s *IssuesService) GetParticipants(pid interface{}, issue int, options ...R
 		return nil, resp, err
 	}
 
-	return bu, resp, nil
+	return bu, resp, err
 }
diff --git a/issues_statistics.go b/issues_statistics.go
index 3574733..16b9fce 100644
--- a/issues_statistics.go
+++ b/issues_statistics.go
@@ -87,7 +87,7 @@ func (s *IssuesStatisticsService) GetIssuesStatistics(opt *GetIssuesStatisticsOp
 		return nil, resp, err
 	}
 
-	return is, resp, nil
+	return is, resp, err
 }
 
 // GetGroupIssuesStatisticsOptions represents the available GetGroupIssuesStatistics()
@@ -135,7 +135,7 @@ func (s *IssuesStatisticsService) GetGroupIssuesStatistics(gid interface{}, opt
 		return nil, resp, err
 	}
 
-	return is, resp, nil
+	return is, resp, err
 }
 
 // GetProjectIssuesStatisticsOptions represents the available
@@ -183,5 +183,5 @@ func (s *IssuesStatisticsService) GetProjectIssuesStatistics(pid interface{}, op
 		return nil, resp, err
 	}
 
-	return is, resp, nil
+	return is, resp, err
 }
diff --git a/jobs.go b/jobs.go
index f7e6849..ba1b6f4 100644
--- a/jobs.go
+++ b/jobs.go
@@ -139,7 +139,7 @@ func (s *JobsService) ListProjectJobs(pid interface{}, opts *ListJobsOptions, op
 		return nil, resp, err
 	}
 
-	return jobs, resp, nil
+	return jobs, resp, err
 }
 
 // ListPipelineJobs gets a list of jobs for specific pipeline in a
@@ -165,7 +165,7 @@ func (s *JobsService) ListPipelineJobs(pid interface{}, pipelineID int, opts *Li
 		return nil, resp, err
 	}
 
-	return jobs, resp, nil
+	return jobs, resp, err
 }
 
 // ListPipelineBridges gets a list of bridges for specific pipeline in a
@@ -191,7 +191,7 @@ func (s *JobsService) ListPipelineBridges(pid interface{}, pipelineID int, opts
 		return nil, resp, err
 	}
 
-	return bridges, resp, nil
+	return bridges, resp, err
 }
 
 // GetJobTokensJobOptions represents the available GetJobTokensJob() options.
@@ -216,7 +216,7 @@ func (s *JobsService) GetJobTokensJob(opts *GetJobTokensJobOptions, options ...R
 		return nil, resp, err
 	}
 
-	return job, resp, nil
+	return job, resp, err
 }
 
 // GetJob gets a single job of a project.
@@ -241,7 +241,7 @@ func (s *JobsService) GetJob(pid interface{}, jobID int, options ...RequestOptio
 		return nil, resp, err
 	}
 
-	return job, resp, nil
+	return job, resp, err
 }
 
 // GetJobArtifacts get jobs artifacts of a project
@@ -419,7 +419,7 @@ func (s *JobsService) CancelJob(pid interface{}, jobID int, options ...RequestOp
 		return nil, resp, err
 	}
 
-	return job, resp, nil
+	return job, resp, err
 }
 
 // RetryJob retries a single job of a project
@@ -444,7 +444,7 @@ func (s *JobsService) RetryJob(pid interface{}, jobID int, options ...RequestOpt
 		return nil, resp, err
 	}
 
-	return job, resp, nil
+	return job, resp, err
 }
 
 // EraseJob erases a single job of a project, removes a job
@@ -470,7 +470,7 @@ func (s *JobsService) EraseJob(pid interface{}, jobID int, options ...RequestOpt
 		return nil, resp, err
 	}
 
-	return job, resp, nil
+	return job, resp, err
 }
 
 // KeepArtifacts prevents artifacts from being deleted when
@@ -496,7 +496,7 @@ func (s *JobsService) KeepArtifacts(pid interface{}, jobID int, options ...Reque
 		return nil, resp, err
 	}
 
-	return job, resp, nil
+	return job, resp, err
 }
 
 // PlayJobOptions represents the available PlayJob() options.
@@ -539,7 +539,7 @@ func (s *JobsService) PlayJob(pid interface{}, jobID int, opt *PlayJobOptions, o
 		return nil, resp, err
 	}
 
-	return job, resp, nil
+	return job, resp, err
 }
 
 // DeleteArtifacts delete artifacts of a job
diff --git a/keys.go b/keys.go
index 0c03f5d..29f2541 100644
--- a/keys.go
+++ b/keys.go
@@ -62,5 +62,5 @@ func (s *KeysService) GetKeyWithUser(key int, options ...RequestOptionFunc) (*Ke
 		return nil, resp, err
 	}
 
-	return k, resp, nil
+	return k, resp, err
 }
diff --git a/labels.go b/labels.go
index 42fc778..d4c8b44 100644
--- a/labels.go
+++ b/labels.go
@@ -102,7 +102,7 @@ func (s *LabelsService) ListLabels(pid interface{}, opt *ListLabelsOptions, opti
 		return nil, resp, err
 	}
 
-	return l, resp, nil
+	return l, resp, err
 }
 
 // GetLabel get a single label for a given project.
@@ -130,7 +130,7 @@ func (s *LabelsService) GetLabel(pid interface{}, labelID interface{}, options .
 		return nil, resp, err
 	}
 
-	return l, resp, nil
+	return l, resp, err
 }
 
 // CreateLabelOptions represents the available CreateLabel() options.
@@ -165,7 +165,7 @@ func (s *LabelsService) CreateLabel(pid interface{}, opt *CreateLabelOptions, op
 		return nil, resp, err
 	}
 
-	return l, resp, nil
+	return l, resp, err
 }
 
 // DeleteLabelOptions represents the available DeleteLabel() options.
@@ -226,7 +226,7 @@ func (s *LabelsService) UpdateLabel(pid interface{}, opt *UpdateLabelOptions, op
 		return nil, resp, err
 	}
 
-	return l, resp, nil
+	return l, resp, err
 }
 
 // SubscribeToLabel subscribes the authenticated user to a label to receive
@@ -257,7 +257,7 @@ func (s *LabelsService) SubscribeToLabel(pid interface{}, labelID interface{}, o
 		return nil, resp, err
 	}
 
-	return l, resp, nil
+	return l, resp, err
 }
 
 // UnsubscribeFromLabel unsubscribes the authenticated user from a label to not
diff --git a/license.go b/license.go
index 4882f90..1c73996 100644
--- a/license.go
+++ b/license.go
@@ -83,7 +83,7 @@ func (s *LicenseService) GetLicense(options ...RequestOptionFunc) (*License, *Re
 		return nil, resp, err
 	}
 
-	return l, resp, nil
+	return l, resp, err
 }
 
 // AddLicenseOptions represents the available AddLicense() options.
@@ -109,7 +109,7 @@ func (s *LicenseService) AddLicense(opt *AddLicenseOptions, options ...RequestOp
 		return nil, resp, err
 	}
 
-	return l, resp, nil
+	return l, resp, err
 }
 
 // DeleteLicense deletes an existing license.
diff --git a/license_templates.go b/license_templates.go
index 7eea05f..70e050e 100644
--- a/license_templates.go
+++ b/license_templates.go
@@ -73,7 +73,7 @@ func (s *LicenseTemplatesService) ListLicenseTemplates(opt *ListLicenseTemplates
 		return nil, resp, err
 	}
 
-	return lts, resp, nil
+	return lts, resp, err
 }
 
 // GetLicenseTemplateOptions represents the available
@@ -105,5 +105,5 @@ func (s *LicenseTemplatesService) GetLicenseTemplate(template string, opt *GetLi
 		return nil, resp, err
 	}
 
-	return lt, resp, nil
+	return lt, resp, err
 }
diff --git a/merge_request_approvals.go b/merge_request_approvals.go
index 0da0af3..09b7d8d 100644
--- a/merge_request_approvals.go
+++ b/merge_request_approvals.go
@@ -158,7 +158,7 @@ func (s *MergeRequestApprovalsService) ApproveMergeRequest(pid interface{}, mr i
 		return nil, resp, err
 	}
 
-	return m, resp, nil
+	return m, resp, err
 }
 
 // UnapproveMergeRequest unapproves a previously approved merge request on GitLab.
@@ -211,7 +211,7 @@ func (s *MergeRequestApprovalsService) GetConfiguration(pid interface{}, mr int,
 		return nil, resp, err
 	}
 
-	return m, resp, nil
+	return m, resp, err
 }
 
 // ChangeApprovalConfiguration updates the approval configuration of a merge request.
@@ -236,7 +236,7 @@ func (s *MergeRequestApprovalsService) ChangeApprovalConfiguration(pid interface
 		return nil, resp, err
 	}
 
-	return m, resp, nil
+	return m, resp, err
 }
 
 // ChangeMergeRequestAllowedApproversOptions represents the available
@@ -271,7 +271,7 @@ func (s *MergeRequestApprovalsService) ChangeAllowedApprovers(pid interface{}, m
 		return nil, resp, err
 	}
 
-	return m, resp, nil
+	return m, resp, err
 }
 
 // GetApprovalRules requests information about a merge request’s approval rules
@@ -296,7 +296,7 @@ func (s *MergeRequestApprovalsService) GetApprovalRules(pid interface{}, mergeRe
 		return nil, resp, err
 	}
 
-	return par, resp, nil
+	return par, resp, err
 }
 
 // GetApprovalState requests information about a merge request’s approval state
@@ -321,7 +321,7 @@ func (s *MergeRequestApprovalsService) GetApprovalState(pid interface{}, mergeRe
 		return nil, resp, err
 	}
 
-	return pas, resp, nil
+	return pas, resp, err
 }
 
 // CreateMergeRequestApprovalRuleOptions represents the available CreateApprovalRule()
@@ -359,7 +359,7 @@ func (s *MergeRequestApprovalsService) CreateApprovalRule(pid interface{}, merge
 		return nil, resp, err
 	}
 
-	return par, resp, nil
+	return par, resp, err
 }
 
 // UpdateMergeRequestApprovalRuleOptions represents the available UpdateApprovalRule()
@@ -396,7 +396,7 @@ func (s *MergeRequestApprovalsService) UpdateApprovalRule(pid interface{}, merge
 		return nil, resp, err
 	}
 
-	return par, resp, nil
+	return par, resp, err
 }
 
 // DeleteApprovalRule deletes a mr level approval rule.
diff --git a/merge_requests.go b/merge_requests.go
index 34a244a..0aaed1c 100644
--- a/merge_requests.go
+++ b/merge_requests.go
@@ -193,7 +193,7 @@ func (s *MergeRequestsService) ListMergeRequests(opt *ListMergeRequestsOptions,
 		return nil, resp, err
 	}
 
-	return m, resp, nil
+	return m, resp, err
 }
 
 // ListProjectMergeRequestsOptions represents the available ListMergeRequests()
@@ -255,7 +255,7 @@ func (s *MergeRequestsService) ListProjectMergeRequests(pid interface{}, opt *Li
 		return nil, resp, err
 	}
 
-	return m, resp, nil
+	return m, resp, err
 }
 
 // ListGroupMergeRequestsOptions represents the available ListGroupMergeRequests()
@@ -317,7 +317,7 @@ func (s *MergeRequestsService) ListGroupMergeRequests(gid interface{}, opt *List
 		return nil, resp, err
 	}
 
-	return m, resp, nil
+	return m, resp, err
 }
 
 // GetMergeRequestsOptions represents the available GetMergeRequests()
@@ -353,7 +353,7 @@ func (s *MergeRequestsService) GetMergeRequest(pid interface{}, mergeRequest int
 		return nil, resp, err
 	}
 
-	return m, resp, nil
+	return m, resp, err
 }
 
 // GetMergeRequestApprovals gets information about a merge requests approvals
@@ -378,7 +378,7 @@ func (s *MergeRequestsService) GetMergeRequestApprovals(pid interface{}, mergeRe
 		return nil, resp, err
 	}
 
-	return a, resp, nil
+	return a, resp, err
 }
 
 // GetMergeRequestCommitsOptions represents the available GetMergeRequestCommits()
@@ -410,7 +410,7 @@ func (s *MergeRequestsService) GetMergeRequestCommits(pid interface{}, mergeRequ
 		return nil, resp, err
 	}
 
-	return c, resp, nil
+	return c, resp, err
 }
 
 // GetMergeRequestChangesOptions represents the available GetMergeRequestChanges()
@@ -445,7 +445,7 @@ func (s *MergeRequestsService) GetMergeRequestChanges(pid interface{}, mergeRequ
 		return nil, resp, err
 	}
 
-	return m, resp, nil
+	return m, resp, err
 }
 
 // GetMergeRequestParticipants gets a list of merge request participants.
@@ -470,7 +470,7 @@ func (s *MergeRequestsService) GetMergeRequestParticipants(pid interface{}, merg
 		return nil, resp, err
 	}
 
-	return ps, resp, nil
+	return ps, resp, err
 }
 
 // ListMergeRequestPipelines gets all pipelines for the provided merge request.
@@ -495,7 +495,7 @@ func (s *MergeRequestsService) ListMergeRequestPipelines(pid interface{}, mergeR
 		return nil, resp, err
 	}
 
-	return p, resp, nil
+	return p, resp, err
 }
 
 // CreateMergeRequestPipeline creates a new pipeline for a merge request.
@@ -520,7 +520,7 @@ func (s *MergeRequestsService) CreateMergeRequestPipeline(pid interface{}, merge
 		return nil, resp, err
 	}
 
-	return p, resp, nil
+	return p, resp, err
 }
 
 // GetIssuesClosedOnMergeOptions represents the available GetIssuesClosedOnMerge()
@@ -553,7 +553,7 @@ func (s *MergeRequestsService) GetIssuesClosedOnMerge(pid interface{}, mergeRequ
 		return nil, resp, err
 	}
 
-	return i, resp, nil
+	return i, resp, err
 }
 
 // CreateMergeRequestOptions represents the available CreateMergeRequest()
@@ -599,7 +599,7 @@ func (s *MergeRequestsService) CreateMergeRequest(pid interface{}, opt *CreateMe
 		return nil, resp, err
 	}
 
-	return m, resp, nil
+	return m, resp, err
 }
 
 // UpdateMergeRequestOptions represents the available UpdateMergeRequest()
@@ -647,7 +647,7 @@ func (s *MergeRequestsService) UpdateMergeRequest(pid interface{}, mergeRequest
 		return nil, resp, err
 	}
 
-	return m, resp, nil
+	return m, resp, err
 }
 
 // DeleteMergeRequest deletes a merge request.
@@ -708,7 +708,7 @@ func (s *MergeRequestsService) AcceptMergeRequest(pid interface{}, mergeRequest
 		return nil, resp, err
 	}
 
-	return m, resp, nil
+	return m, resp, err
 }
 
 // CancelMergeWhenPipelineSucceeds cancels a merge when pipeline succeeds. If
@@ -737,7 +737,7 @@ func (s *MergeRequestsService) CancelMergeWhenPipelineSucceeds(pid interface{},
 		return nil, resp, err
 	}
 
-	return m, resp, nil
+	return m, resp, err
 }
 
 // RebaseMergeRequest automatically rebases the source_branch of the merge
@@ -790,7 +790,7 @@ func (s *MergeRequestsService) GetMergeRequestDiffVersions(pid interface{}, merg
 		return nil, resp, err
 	}
 
-	return v, resp, nil
+	return v, resp, err
 }
 
 // GetSingleMergeRequestDiffVersion get a single MR diff version
@@ -815,7 +815,7 @@ func (s *MergeRequestsService) GetSingleMergeRequestDiffVersion(pid interface{},
 		return nil, resp, err
 	}
 
-	return v, resp, nil
+	return v, resp, err
 }
 
 // SubscribeToMergeRequest subscribes the authenticated user to the given merge
@@ -842,7 +842,7 @@ func (s *MergeRequestsService) SubscribeToMergeRequest(pid interface{}, mergeReq
 		return nil, resp, err
 	}
 
-	return m, resp, nil
+	return m, resp, err
 }
 
 // UnsubscribeFromMergeRequest unsubscribes the authenticated user from the
@@ -870,7 +870,7 @@ func (s *MergeRequestsService) UnsubscribeFromMergeRequest(pid interface{}, merg
 		return nil, resp, err
 	}
 
-	return m, resp, nil
+	return m, resp, err
 }
 
 // CreateTodo manually creates a todo for the current user on a merge request.
@@ -897,7 +897,7 @@ func (s *MergeRequestsService) CreateTodo(pid interface{}, mergeRequest int, opt
 		return nil, resp, err
 	}
 
-	return t, resp, nil
+	return t, resp, err
 }
 
 // SetTimeEstimate sets the time estimate for a single project merge request.
diff --git a/metadata.go b/metadata.go
index db23a81..1713f3c 100644
--- a/metadata.go
+++ b/metadata.go
@@ -59,5 +59,5 @@ func (s *MetadataService) GetMetadata(options ...RequestOptionFunc) (*Metadata,
 		return nil, resp, err
 	}
 
-	return v, resp, nil
+	return v, resp, err
 }
diff --git a/milestones.go b/milestones.go
index 095c913..cba00f5 100644
--- a/milestones.go
+++ b/milestones.go
@@ -87,7 +87,7 @@ func (s *MilestonesService) ListMilestones(pid interface{}, opt *ListMilestonesO
 		return nil, resp, err
 	}
 
-	return m, resp, nil
+	return m, resp, err
 }
 
 // GetMilestone gets a single project milestone.
@@ -112,7 +112,7 @@ func (s *MilestonesService) GetMilestone(pid interface{}, milestone int, options
 		return nil, resp, err
 	}
 
-	return m, resp, nil
+	return m, resp, err
 }
 
 // CreateMilestoneOptions represents the available CreateMilestone() options.
@@ -148,7 +148,7 @@ func (s *MilestonesService) CreateMilestone(pid interface{}, opt *CreateMileston
 		return nil, resp, err
 	}
 
-	return m, resp, nil
+	return m, resp, err
 }
 
 // UpdateMilestoneOptions represents the available UpdateMilestone() options.
@@ -185,7 +185,7 @@ func (s *MilestonesService) UpdateMilestone(pid interface{}, milestone int, opt
 		return nil, resp, err
 	}
 
-	return m, resp, nil
+	return m, resp, err
 }
 
 // DeleteMilestone deletes a specified project milestone.
@@ -234,7 +234,7 @@ func (s *MilestonesService) GetMilestoneIssues(pid interface{}, milestone int, o
 		return nil, resp, err
 	}
 
-	return i, resp, nil
+	return i, resp, err
 }
 
 // GetMilestoneMergeRequestsOptions represents the available
@@ -267,5 +267,5 @@ func (s *MilestonesService) GetMilestoneMergeRequests(pid interface{}, milestone
 		return nil, resp, err
 	}
 
-	return mr, resp, nil
+	return mr, resp, err
 }
diff --git a/namespaces.go b/namespaces.go
index da82a0c..26a0cca 100644
--- a/namespaces.go
+++ b/namespaces.go
@@ -78,7 +78,7 @@ func (s *NamespacesService) ListNamespaces(opt *ListNamespacesOptions, options .
 		return nil, resp, err
 	}
 
-	return n, resp, nil
+	return n, resp, err
 }
 
 // SearchNamespace gets all namespaces that match your string in their name
@@ -103,7 +103,7 @@ func (s *NamespacesService) SearchNamespace(query string, options ...RequestOpti
 		return nil, resp, err
 	}
 
-	return n, resp, nil
+	return n, resp, err
 }
 
 // GetNamespace gets a namespace by id.
@@ -128,7 +128,7 @@ func (s *NamespacesService) GetNamespace(id interface{}, options ...RequestOptio
 		return nil, resp, err
 	}
 
-	return n, resp, nil
+	return n, resp, err
 }
 
 // NamespaceExistance represents a namespace exists result.
@@ -170,5 +170,5 @@ func (s *NamespacesService) NamespaceExists(id interface{}, opt *NamespaceExists
 		return nil, resp, err
 	}
 
-	return n, resp, nil
+	return n, resp, err
 }
diff --git a/notes.go b/notes.go
index 5e80f14..a71a947 100644
--- a/notes.go
+++ b/notes.go
@@ -135,7 +135,7 @@ func (s *NotesService) ListIssueNotes(pid interface{}, issue int, opt *ListIssue
 		return nil, resp, err
 	}
 
-	return n, resp, nil
+	return n, resp, err
 }
 
 // GetIssueNote returns a single note for a specific project issue.
@@ -160,7 +160,7 @@ func (s *NotesService) GetIssueNote(pid interface{}, issue, note int, options ..
 		return nil, resp, err
 	}
 
-	return n, resp, nil
+	return n, resp, err
 }
 
 // CreateIssueNoteOptions represents the available CreateIssueNote()
@@ -195,7 +195,7 @@ func (s *NotesService) CreateIssueNote(pid interface{}, issue int, opt *CreateIs
 		return nil, resp, err
 	}
 
-	return n, resp, nil
+	return n, resp, err
 }
 
 // UpdateIssueNoteOptions represents the available UpdateIssueNote()
@@ -229,7 +229,7 @@ func (s *NotesService) UpdateIssueNote(pid interface{}, issue, note int, opt *Up
 		return nil, resp, err
 	}
 
-	return n, resp, nil
+	return n, resp, err
 }
 
 // DeleteIssueNote deletes an existing note of an issue.
@@ -284,7 +284,7 @@ func (s *NotesService) ListSnippetNotes(pid interface{}, snippet int, opt *ListS
 		return nil, resp, err
 	}
 
-	return n, resp, nil
+	return n, resp, err
 }
 
 // GetSnippetNote returns a single note for a given snippet.
@@ -309,7 +309,7 @@ func (s *NotesService) GetSnippetNote(pid interface{}, snippet, note int, option
 		return nil, resp, err
 	}
 
-	return n, resp, nil
+	return n, resp, err
 }
 
 // CreateSnippetNoteOptions represents the available CreateSnippetNote()
@@ -344,7 +344,7 @@ func (s *NotesService) CreateSnippetNote(pid interface{}, snippet int, opt *Crea
 		return nil, resp, err
 	}
 
-	return n, resp, nil
+	return n, resp, err
 }
 
 // UpdateSnippetNoteOptions represents the available UpdateSnippetNote()
@@ -378,7 +378,7 @@ func (s *NotesService) UpdateSnippetNote(pid interface{}, snippet, note int, opt
 		return nil, resp, err
 	}
 
-	return n, resp, nil
+	return n, resp, err
 }
 
 // DeleteSnippetNote deletes an existing note of a snippet.
@@ -433,7 +433,7 @@ func (s *NotesService) ListMergeRequestNotes(pid interface{}, mergeRequest int,
 		return nil, resp, err
 	}
 
-	return n, resp, nil
+	return n, resp, err
 }
 
 // GetMergeRequestNote returns a single note for a given merge request.
@@ -458,7 +458,7 @@ func (s *NotesService) GetMergeRequestNote(pid interface{}, mergeRequest, note i
 		return nil, resp, err
 	}
 
-	return n, resp, nil
+	return n, resp, err
 }
 
 // CreateMergeRequestNoteOptions represents the available
@@ -492,7 +492,7 @@ func (s *NotesService) CreateMergeRequestNote(pid interface{}, mergeRequest int,
 		return nil, resp, err
 	}
 
-	return n, resp, nil
+	return n, resp, err
 }
 
 // UpdateMergeRequestNoteOptions represents the available
@@ -526,7 +526,7 @@ func (s *NotesService) UpdateMergeRequestNote(pid interface{}, mergeRequest, not
 		return nil, resp, err
 	}
 
-	return n, resp, nil
+	return n, resp, err
 }
 
 // DeleteMergeRequestNote deletes an existing note of a merge request.
@@ -581,7 +581,7 @@ func (s *NotesService) ListEpicNotes(gid interface{}, epic int, opt *ListEpicNot
 		return nil, resp, err
 	}
 
-	return n, resp, nil
+	return n, resp, err
 }
 
 // GetEpicNote returns a single note for an epic.
@@ -606,7 +606,7 @@ func (s *NotesService) GetEpicNote(gid interface{}, epic, note int, options ...R
 		return nil, resp, err
 	}
 
-	return n, resp, nil
+	return n, resp, err
 }
 
 // CreateEpicNoteOptions represents the available CreateEpicNote() options.
@@ -639,7 +639,7 @@ func (s *NotesService) CreateEpicNote(gid interface{}, epic int, opt *CreateEpic
 		return nil, resp, err
 	}
 
-	return n, resp, nil
+	return n, resp, err
 }
 
 // UpdateEpicNoteOptions represents the available UpdateEpicNote() options.
@@ -671,7 +671,7 @@ func (s *NotesService) UpdateEpicNote(gid interface{}, epic, note int, opt *Upda
 		return nil, resp, err
 	}
 
-	return n, resp, nil
+	return n, resp, err
 }
 
 // DeleteEpicNote deletes an existing note of a merge request.
diff --git a/notifications.go b/notifications.go
index da02415..13b9aa6 100644
--- a/notifications.go
+++ b/notifications.go
@@ -81,7 +81,7 @@ func (s *NotificationSettingsService) GetGlobalSettings(options ...RequestOption
 		return nil, resp, err
 	}
 
-	return ns, resp, nil
+	return ns, resp, err
 }
 
 // NotificationSettingsOptions represents the available options that can be passed
@@ -126,7 +126,7 @@ func (s *NotificationSettingsService) UpdateGlobalSettings(opt *NotificationSett
 		return nil, resp, err
 	}
 
-	return ns, resp, nil
+	return ns, resp, err
 }
 
 // GetSettingsForGroup returns current group notification settings.
@@ -151,7 +151,7 @@ func (s *NotificationSettingsService) GetSettingsForGroup(gid interface{}, optio
 		return nil, resp, err
 	}
 
-	return ns, resp, nil
+	return ns, resp, err
 }
 
 // GetSettingsForProject returns current project notification settings.
@@ -176,7 +176,7 @@ func (s *NotificationSettingsService) GetSettingsForProject(pid interface{}, opt
 		return nil, resp, err
 	}
 
-	return ns, resp, nil
+	return ns, resp, err
 }
 
 // UpdateSettingsForGroup updates current group notification settings.
@@ -201,7 +201,7 @@ func (s *NotificationSettingsService) UpdateSettingsForGroup(gid interface{}, op
 		return nil, resp, err
 	}
 
-	return ns, resp, nil
+	return ns, resp, err
 }
 
 // UpdateSettingsForProject updates current project notification settings.
@@ -226,5 +226,5 @@ func (s *NotificationSettingsService) UpdateSettingsForProject(pid interface{},
 		return nil, resp, err
 	}
 
-	return ns, resp, nil
+	return ns, resp, err
 }
diff --git a/packages.go b/packages.go
index a63cdc4..e309ebd 100644
--- a/packages.go
+++ b/packages.go
@@ -140,7 +140,7 @@ func (s *PackagesService) ListProjectPackages(pid interface{}, opt *ListProjectP
 		return nil, resp, err
 	}
 
-	return ps, resp, nil
+	return ps, resp, err
 }
 
 // ListGroupPackagesOptions represents the available ListGroupPackages()
@@ -181,7 +181,7 @@ func (s *PackagesService) ListGroupPackages(gid interface{}, opt *ListGroupPacka
 		return nil, resp, err
 	}
 
-	return ps, resp, nil
+	return ps, resp, err
 }
 
 // ListPackageFilesOptions represents the available ListPackageFiles()
@@ -217,7 +217,7 @@ func (s *PackagesService) ListPackageFiles(pid interface{}, pkg int, opt *ListPa
 		return nil, resp, err
 	}
 
-	return pfs, resp, nil
+	return pfs, resp, err
 }
 
 // DeleteProjectPackage deletes a package in a project.
diff --git a/pages_domains.go b/pages_domains.go
index 07d985d..c3b9aba 100644
--- a/pages_domains.go
+++ b/pages_domains.go
@@ -78,7 +78,7 @@ func (s *PagesDomainsService) ListPagesDomains(pid interface{}, opt *ListPagesDo
 		return nil, resp, err
 	}
 
-	return pd, resp, nil
+	return pd, resp, err
 }
 
 // ListAllPagesDomains gets a list of all pages domains.
@@ -97,7 +97,7 @@ func (s *PagesDomainsService) ListAllPagesDomains(options ...RequestOptionFunc)
 		return nil, resp, err
 	}
 
-	return pd, resp, nil
+	return pd, resp, err
 }
 
 // GetPagesDomain get a specific pages domain for a project.
@@ -122,7 +122,7 @@ func (s *PagesDomainsService) GetPagesDomain(pid interface{}, domain string, opt
 		return nil, resp, err
 	}
 
-	return pd, resp, nil
+	return pd, resp, err
 }
 
 // CreatePagesDomainOptions represents the available CreatePagesDomain() options.
@@ -158,7 +158,7 @@ func (s *PagesDomainsService) CreatePagesDomain(pid interface{}, opt *CreatePage
 		return nil, resp, err
 	}
 
-	return pd, resp, nil
+	return pd, resp, err
 }
 
 // UpdatePagesDomainOptions represents the available UpdatePagesDomain() options.
@@ -193,7 +193,7 @@ func (s *PagesDomainsService) UpdatePagesDomain(pid interface{}, domain string,
 		return nil, resp, err
 	}
 
-	return pd, resp, nil
+	return pd, resp, err
 }
 
 // DeletePagesDomain deletes an existing prject pages domain.
diff --git a/personal_access_tokens.go b/personal_access_tokens.go
index bb27c77..07d6de2 100644
--- a/personal_access_tokens.go
+++ b/personal_access_tokens.go
@@ -76,7 +76,7 @@ func (s *PersonalAccessTokensService) ListPersonalAccessTokens(opt *ListPersonal
 		return nil, resp, err
 	}
 
-	return pats, resp, nil
+	return pats, resp, err
 }
 
 // GetSinglePersonalAccessTokenByID get a single personal access token by its ID.
@@ -96,7 +96,7 @@ func (s *PersonalAccessTokensService) GetSinglePersonalAccessTokenByID(user int,
 		return nil, resp, err
 	}
 
-	return pat, resp, nil
+	return pat, resp, err
 }
 
 // GetSinglePersonalAccessToken get a single personal access token by using
@@ -117,7 +117,7 @@ func (s *PersonalAccessTokensService) GetSinglePersonalAccessToken(options ...Re
 		return nil, resp, err
 	}
 
-	return pat, resp, nil
+	return pat, resp, err
 }
 
 // RevokePersonalAccessToken revokes a personal access token.
diff --git a/pipeline_schedules.go b/pipeline_schedules.go
index d7c85df..0f307cb 100644
--- a/pipeline_schedules.go
+++ b/pipeline_schedules.go
@@ -35,27 +35,23 @@ type PipelineSchedulesService struct {
 // GitLab API docs:
 // https://docs.gitlab.com/ee/api/pipeline_schedules.html
 type PipelineSchedule struct {
-	ID           int                 `json:"id"`
-	Description  string              `json:"description"`
-	Ref          string              `json:"ref"`
-	Cron         string              `json:"cron"`
-	CronTimezone string              `json:"cron_timezone"`
-	NextRunAt    *time.Time          `json:"next_run_at"`
-	Active       bool                `json:"active"`
-	CreatedAt    *time.Time          `json:"created_at"`
-	UpdatedAt    *time.Time          `json:"updated_at"`
-	Owner        *User               `json:"owner"`
-	LastPipeline *LastPipeline       `json:"last_pipeline"`
-	Variables    []*PipelineVariable `json:"variables"`
-}
-
-// LastPipeline represents the last pipeline ran by schedule
-// this will be returned only for individual schedule get operation
-type LastPipeline struct {
-	ID     int    `json:"id"`
-	SHA    string `json:"sha"`
-	Ref    string `json:"ref"`
-	Status string `json:"status"`
+	ID           int        `json:"id"`
+	Description  string     `json:"description"`
+	Ref          string     `json:"ref"`
+	Cron         string     `json:"cron"`
+	CronTimezone string     `json:"cron_timezone"`
+	NextRunAt    *time.Time `json:"next_run_at"`
+	Active       bool       `json:"active"`
+	CreatedAt    *time.Time `json:"created_at"`
+	UpdatedAt    *time.Time `json:"updated_at"`
+	Owner        *User      `json:"owner"`
+	LastPipeline struct {
+		ID     int    `json:"id"`
+		SHA    string `json:"sha"`
+		Ref    string `json:"ref"`
+		Status string `json:"status"`
+	} `json:"last_pipeline"`
+	Variables []*PipelineVariable `json:"variables"`
 }
 
 // ListPipelineSchedulesOptions represents the available ListPipelineTriggers() options.
@@ -86,7 +82,7 @@ func (s *PipelineSchedulesService) ListPipelineSchedules(pid interface{}, opt *L
 		return nil, resp, err
 	}
 
-	return ps, resp, nil
+	return ps, resp, err
 }
 
 // GetPipelineSchedule gets a pipeline schedule.
@@ -111,7 +107,7 @@ func (s *PipelineSchedulesService) GetPipelineSchedule(pid interface{}, schedule
 		return nil, resp, err
 	}
 
-	return p, resp, nil
+	return p, resp, err
 }
 
 // ListPipelinesTriggeredByScheduleOptions represents the available
@@ -144,7 +140,7 @@ func (s *PipelineSchedulesService) ListPipelinesTriggeredBySchedule(pid interfac
 		return nil, resp, err
 	}
 
-	return p, resp, nil
+	return p, resp, err
 }
 
 // CreatePipelineScheduleOptions represents the available
@@ -182,7 +178,7 @@ func (s *PipelineSchedulesService) CreatePipelineSchedule(pid interface{}, opt *
 		return nil, resp, err
 	}
 
-	return p, resp, nil
+	return p, resp, err
 }
 
 // EditPipelineScheduleOptions represents the available
@@ -220,7 +216,7 @@ func (s *PipelineSchedulesService) EditPipelineSchedule(pid interface{}, schedul
 		return nil, resp, err
 	}
 
-	return p, resp, nil
+	return p, resp, err
 }
 
 // TakeOwnershipOfPipelineSchedule sets the owner of the specified
@@ -246,7 +242,7 @@ func (s *PipelineSchedulesService) TakeOwnershipOfPipelineSchedule(pid interface
 		return nil, resp, err
 	}
 
-	return p, resp, nil
+	return p, resp, err
 }
 
 // DeletePipelineSchedule deletes a pipeline schedule.
@@ -320,7 +316,7 @@ func (s *PipelineSchedulesService) CreatePipelineScheduleVariable(pid interface{
 		return nil, resp, err
 	}
 
-	return p, resp, nil
+	return p, resp, err
 }
 
 // EditPipelineScheduleVariableOptions represents the available
@@ -355,7 +351,7 @@ func (s *PipelineSchedulesService) EditPipelineScheduleVariable(pid interface{},
 		return nil, resp, err
 	}
 
-	return p, resp, nil
+	return p, resp, err
 }
 
 // DeletePipelineScheduleVariable creates a pipeline schedule variable.
@@ -380,5 +376,5 @@ func (s *PipelineSchedulesService) DeletePipelineScheduleVariable(pid interface{
 		return nil, resp, err
 	}
 
-	return p, resp, nil
+	return p, resp, err
 }
diff --git a/pipeline_triggers.go b/pipeline_triggers.go
index 39269a3..01b3f6b 100644
--- a/pipeline_triggers.go
+++ b/pipeline_triggers.go
@@ -73,7 +73,7 @@ func (s *PipelineTriggersService) ListPipelineTriggers(pid interface{}, opt *Lis
 		return nil, resp, err
 	}
 
-	return pt, resp, nil
+	return pt, resp, err
 }
 
 // GetPipelineTrigger gets a specific pipeline trigger for a project.
@@ -98,7 +98,7 @@ func (s *PipelineTriggersService) GetPipelineTrigger(pid interface{}, trigger in
 		return nil, resp, err
 	}
 
-	return pt, resp, nil
+	return pt, resp, err
 }
 
 // AddPipelineTriggerOptions represents the available AddPipelineTrigger() options.
@@ -131,7 +131,7 @@ func (s *PipelineTriggersService) AddPipelineTrigger(pid interface{}, opt *AddPi
 		return nil, resp, err
 	}
 
-	return pt, resp, nil
+	return pt, resp, err
 }
 
 // EditPipelineTriggerOptions represents the available EditPipelineTrigger() options.
@@ -164,7 +164,7 @@ func (s *PipelineTriggersService) EditPipelineTrigger(pid interface{}, trigger i
 		return nil, resp, err
 	}
 
-	return pt, resp, nil
+	return pt, resp, err
 }
 
 // TakeOwnershipOfPipelineTrigger sets the owner of the specified
@@ -190,7 +190,7 @@ func (s *PipelineTriggersService) TakeOwnershipOfPipelineTrigger(pid interface{}
 		return nil, resp, err
 	}
 
-	return pt, resp, nil
+	return pt, resp, err
 }
 
 // DeletePipelineTrigger removes a trigger from a project.
@@ -244,5 +244,5 @@ func (s *PipelineTriggersService) RunPipelineTrigger(pid interface{}, opt *RunPi
 		return nil, resp, err
 	}
 
-	return pt, resp, nil
+	return pt, resp, err
 }
diff --git a/pipelines.go b/pipelines.go
index 5b01e49..df77edf 100644
--- a/pipelines.go
+++ b/pipelines.go
@@ -195,7 +195,7 @@ func (s *PipelinesService) ListProjectPipelines(pid interface{}, opt *ListProjec
 		return nil, resp, err
 	}
 
-	return p, resp, nil
+	return p, resp, err
 }
 
 // GetPipeline gets a single project pipeline.
@@ -219,7 +219,7 @@ func (s *PipelinesService) GetPipeline(pid interface{}, pipeline int, options ..
 		return nil, resp, err
 	}
 
-	return p, resp, nil
+	return p, resp, err
 }
 
 // GetPipelineVariables gets the variables of a single project pipeline.
@@ -243,7 +243,7 @@ func (s *PipelinesService) GetPipelineVariables(pid interface{}, pipeline int, o
 		return nil, resp, err
 	}
 
-	return p, resp, nil
+	return p, resp, err
 }
 
 // GetPipelineTestReport gets the test report of a single project pipeline.
@@ -267,7 +267,7 @@ func (s *PipelinesService) GetPipelineTestReport(pid interface{}, pipeline int,
 		return nil, resp, err
 	}
 
-	return p, resp, nil
+	return p, resp, err
 }
 
 // GetLatestPipelineOptions represents the available GetLatestPipeline() options.
@@ -298,7 +298,7 @@ func (s *PipelinesService) GetLatestPipeline(pid interface{}, opt *GetLatestPipe
 		return nil, resp, err
 	}
 
-	return p, resp, nil
+	return p, resp, err
 }
 
 // CreatePipelineOptions represents the available CreatePipeline() options.
@@ -339,7 +339,7 @@ func (s *PipelinesService) CreatePipeline(pid interface{}, opt *CreatePipelineOp
 		return nil, resp, err
 	}
 
-	return p, resp, nil
+	return p, resp, err
 }
 
 // RetryPipelineBuild retries failed builds in a pipeline
@@ -364,7 +364,7 @@ func (s *PipelinesService) RetryPipelineBuild(pid interface{}, pipeline int, opt
 		return nil, resp, err
 	}
 
-	return p, resp, nil
+	return p, resp, err
 }
 
 // CancelPipelineBuild cancels a pipeline builds
@@ -389,7 +389,7 @@ func (s *PipelinesService) CancelPipelineBuild(pid interface{}, pipeline int, op
 		return nil, resp, err
 	}
 
-	return p, resp, nil
+	return p, resp, err
 }
 
 // DeletePipeline deletes an existing pipeline.
diff --git a/plan_limits.go b/plan_limits.go
index 893ae75..e6be78f 100644
--- a/plan_limits.go
+++ b/plan_limits.go
@@ -65,7 +65,7 @@ func (s *PlanLimitsService) GetCurrentPlanLimits(opt *GetCurrentPlanLimitsOption
 		return nil, resp, err
 	}
 
-	return pl, resp, nil
+	return pl, resp, err
 }
 
 // ChangePlanLimitOptions represents the available ChangePlanLimits() options.
@@ -100,5 +100,5 @@ func (s *PlanLimitsService) ChangePlanLimits(opt *ChangePlanLimitOptions, option
 		return nil, resp, err
 	}
 
-	return pl, resp, nil
+	return pl, resp, err
 }
diff --git a/project_access_tokens.go b/project_access_tokens.go
index 9fa510d..1c0d3c7 100644
--- a/project_access_tokens.go
+++ b/project_access_tokens.go
@@ -81,7 +81,7 @@ func (s *ProjectAccessTokensService) ListProjectAccessTokens(pid interface{}, op
 		return nil, resp, err
 	}
 
-	return pats, resp, nil
+	return pats, resp, err
 }
 
 // GetProjectAccessToken gets a single project access tokens in a project.
@@ -106,7 +106,7 @@ func (s *ProjectAccessTokensService) GetProjectAccessToken(pid interface{}, id i
 		return nil, resp, err
 	}
 
-	return pat, resp, nil
+	return pat, resp, err
 }
 
 // CreateProjectAccessTokenOptions represents the available CreateVariable()
@@ -143,7 +143,7 @@ func (s *ProjectAccessTokensService) CreateProjectAccessToken(pid interface{}, o
 		return nil, resp, err
 	}
 
-	return pat, resp, nil
+	return pat, resp, err
 }
 
 // RevokeProjectAccessToken revokes a project access token.
diff --git a/project_badges.go b/project_badges.go
index d5afe1e..aa62a1f 100644
--- a/project_badges.go
+++ b/project_badges.go
@@ -76,7 +76,7 @@ func (s *ProjectBadgesService) ListProjectBadges(pid interface{}, opt *ListProje
 		return nil, resp, err
 	}
 
-	return pb, resp, nil
+	return pb, resp, err
 }
 
 // GetProjectBadge gets a project badge.
@@ -101,7 +101,7 @@ func (s *ProjectBadgesService) GetProjectBadge(pid interface{}, badge int, optio
 		return nil, resp, err
 	}
 
-	return pb, resp, nil
+	return pb, resp, err
 }
 
 // AddProjectBadgeOptions represents the available AddProjectBadge() options.
@@ -136,7 +136,7 @@ func (s *ProjectBadgesService) AddProjectBadge(pid interface{}, opt *AddProjectB
 		return nil, resp, err
 	}
 
-	return pb, resp, nil
+	return pb, resp, err
 }
 
 // EditProjectBadgeOptions represents the available EditProjectBadge() options.
@@ -171,7 +171,7 @@ func (s *ProjectBadgesService) EditProjectBadge(pid interface{}, badge int, opt
 		return nil, resp, err
 	}
 
-	return pb, resp, nil
+	return pb, resp, err
 }
 
 // DeleteProjectBadge removes a badge from a project. Only project's
@@ -226,5 +226,5 @@ func (s *ProjectBadgesService) PreviewProjectBadge(pid interface{}, opt *Project
 		return nil, resp, err
 	}
 
-	return pb, resp, nil
+	return pb, resp, err
 }
diff --git a/project_clusters.go b/project_clusters.go
index 792a69b..f515821 100644
--- a/project_clusters.go
+++ b/project_clusters.go
@@ -95,7 +95,7 @@ func (s *ProjectClustersService) ListClusters(pid interface{}, options ...Reques
 		return nil, resp, err
 	}
 
-	return pcs, resp, nil
+	return pcs, resp, err
 }
 
 // GetCluster gets a cluster.
@@ -120,7 +120,7 @@ func (s *ProjectClustersService) GetCluster(pid interface{}, cluster int, option
 		return nil, resp, err
 	}
 
-	return pc, resp, nil
+	return pc, resp, err
 }
 
 // AddClusterOptions represents the available AddCluster() options.
@@ -168,7 +168,7 @@ func (s *ProjectClustersService) AddCluster(pid interface{}, opt *AddClusterOpti
 		return nil, resp, err
 	}
 
-	return pc, resp, nil
+	return pc, resp, err
 }
 
 // EditClusterOptions represents the available EditCluster() options.
@@ -213,7 +213,7 @@ func (s *ProjectClustersService) EditCluster(pid interface{}, cluster int, opt *
 		return nil, resp, err
 	}
 
-	return pc, resp, nil
+	return pc, resp, err
 }
 
 // DeleteCluster deletes an existing project cluster.
diff --git a/project_feature_flags.go b/project_feature_flags.go
index 9f75611..79aaf8b 100644
--- a/project_feature_flags.go
+++ b/project_feature_flags.go
@@ -90,7 +90,7 @@ func (s *ProjectFeatureFlagService) ListProjectFeatureFlags(pid interface{}, opt
 		return nil, resp, err
 	}
 
-	return pffs, resp, nil
+	return pffs, resp, err
 }
 
 // GetProjectFeatureFlag gets a single feature flag for the specified project.
@@ -115,7 +115,7 @@ func (s *ProjectFeatureFlagService) GetProjectFeatureFlag(pid interface{}, name
 		return nil, resp, err
 	}
 
-	return flag, resp, nil
+	return flag, resp, err
 }
 
 // CreateProjectFeatureFlagOptions represents the available
@@ -177,7 +177,7 @@ func (s *ProjectFeatureFlagService) CreateProjectFeatureFlag(pid interface{}, op
 		return flag, resp, err
 	}
 
-	return flag, resp, nil
+	return flag, resp, err
 }
 
 // UpdateProjectFeatureFlagOptions represents the available
@@ -217,7 +217,7 @@ func (s *ProjectFeatureFlagService) UpdateProjectFeatureFlag(pid interface{}, na
 		return flag, resp, err
 	}
 
-	return flag, resp, nil
+	return flag, resp, err
 }
 
 // DeleteProjectFeatureFlag deletes a feature flag
diff --git a/project_import_export.go b/project_import_export.go
index 266be83..ffd4ace 100644
--- a/project_import_export.go
+++ b/project_import_export.go
@@ -132,7 +132,7 @@ func (s *ProjectImportExportService) ExportStatus(pid interface{}, options ...Re
 		return nil, resp, err
 	}
 
-	return es, resp, nil
+	return es, resp, err
 }
 
 // ExportDownload download the finished export.
@@ -196,7 +196,7 @@ func (s *ProjectImportExportService) ImportFromFile(archive io.Reader, opt *Impo
 		return nil, resp, err
 	}
 
-	return is, resp, nil
+	return is, resp, err
 }
 
 // ImportStatus get the status of an import.
@@ -221,5 +221,5 @@ func (s *ProjectImportExportService) ImportStatus(pid interface{}, options ...Re
 		return nil, resp, err
 	}
 
-	return is, resp, nil
+	return is, resp, err
 }
diff --git a/project_iterations.go b/project_iterations.go
index 1fe0ddf..12c42db 100644
--- a/project_iterations.go
+++ b/project_iterations.go
@@ -86,5 +86,5 @@ func (i *ProjectIterationsService) ListProjectIterations(pid interface{}, opt *L
 		return nil, resp, err
 	}
 
-	return pis, resp, nil
+	return pis, resp, err
 }
diff --git a/project_managed_licenses.go b/project_managed_licenses.go
index d6f23f2..25c8ef6 100644
--- a/project_managed_licenses.go
+++ b/project_managed_licenses.go
@@ -60,7 +60,7 @@ func (s *ManagedLicensesService) ListManagedLicenses(pid interface{}, options ..
 		return nil, resp, err
 	}
 
-	return mls, resp, nil
+	return mls, resp, err
 }
 
 // GetManagedLicense returns an existing managed license.
@@ -89,7 +89,7 @@ func (s *ManagedLicensesService) GetManagedLicense(pid, mlid interface{}, option
 		return nil, resp, err
 	}
 
-	return ml, resp, nil
+	return ml, resp, err
 }
 
 // AddManagedLicenseOptions represents the available AddManagedLicense() options.
@@ -123,7 +123,7 @@ func (s *ManagedLicensesService) AddManagedLicense(pid interface{}, opt *AddMana
 		return nil, resp, err
 	}
 
-	return ml, resp, nil
+	return ml, resp, err
 }
 
 // DeleteManagedLicense deletes a managed license with a given ID.
@@ -184,5 +184,5 @@ func (s *ManagedLicensesService) EditManagedLicense(pid, mlid interface{}, opt *
 		return nil, resp, err
 	}
 
-	return ml, resp, nil
+	return ml, resp, err
 }
diff --git a/project_members.go b/project_members.go
index 810fd36..7042dfb 100644
--- a/project_members.go
+++ b/project_members.go
@@ -64,7 +64,7 @@ func (s *ProjectMembersService) ListProjectMembers(pid interface{}, opt *ListPro
 		return nil, resp, err
 	}
 
-	return pm, resp, nil
+	return pm, resp, err
 }
 
 // ListAllProjectMembers gets a list of a project's team members viewable by the
@@ -91,7 +91,7 @@ func (s *ProjectMembersService) ListAllProjectMembers(pid interface{}, opt *List
 		return nil, resp, err
 	}
 
-	return pm, resp, nil
+	return pm, resp, err
 }
 
 // GetProjectMember gets a project team member.
@@ -116,7 +116,7 @@ func (s *ProjectMembersService) GetProjectMember(pid interface{}, user int, opti
 		return nil, resp, err
 	}
 
-	return pm, resp, nil
+	return pm, resp, err
 }
 
 // GetInheritedProjectMember gets a project team member, including inherited
@@ -141,7 +141,7 @@ func (s *ProjectMembersService) GetInheritedProjectMember(pid interface{}, user
 		return nil, resp, err
 	}
 
-	return pm, resp, nil
+	return pm, resp, err
 }
 
 // AddProjectMemberOptions represents the available AddProjectMember() options.
@@ -179,7 +179,7 @@ func (s *ProjectMembersService) AddProjectMember(pid interface{}, opt *AddProjec
 		return nil, resp, err
 	}
 
-	return pm, resp, nil
+	return pm, resp, err
 }
 
 // EditProjectMemberOptions represents the available EditProjectMember() options.
@@ -213,7 +213,7 @@ func (s *ProjectMembersService) EditProjectMember(pid interface{}, user int, opt
 		return nil, resp, err
 	}
 
-	return pm, resp, nil
+	return pm, resp, err
 }
 
 // DeleteProjectMember removes a user from a project team.
diff --git a/project_mirror.go b/project_mirror.go
index 129040c..a8c1ad2 100644
--- a/project_mirror.go
+++ b/project_mirror.go
@@ -71,7 +71,7 @@ func (s *ProjectMirrorService) ListProjectMirror(pid interface{}, opt *ListProje
 		return nil, resp, err
 	}
 
-	return pm, resp, nil
+	return pm, resp, err
 }
 
 // GetProjectMirror gets a single mirror configured on the project.
@@ -96,7 +96,7 @@ func (s *ProjectMirrorService) GetProjectMirror(pid interface{}, mirror int, opt
 		return nil, resp, err
 	}
 
-	return pm, resp, nil
+	return pm, resp, err
 }
 
 // AddProjectMirrorOptions contains the properties requires to create
@@ -133,7 +133,7 @@ func (s *ProjectMirrorService) AddProjectMirror(pid interface{}, opt *AddProject
 		return nil, resp, err
 	}
 
-	return pm, resp, nil
+	return pm, resp, err
 }
 
 // EditProjectMirrorOptions contains the properties requires to edit
@@ -169,7 +169,7 @@ func (s *ProjectMirrorService) EditProjectMirror(pid interface{}, mirror int, op
 		return nil, resp, err
 	}
 
-	return pm, resp, nil
+	return pm, resp, err
 }
 
 // DeleteProjectMirror deletes a project mirror.
diff --git a/project_snippets.go b/project_snippets.go
index fe8e46a..b3616be 100644
--- a/project_snippets.go
+++ b/project_snippets.go
@@ -56,7 +56,7 @@ func (s *ProjectSnippetsService) ListSnippets(pid interface{}, opt *ListProjectS
 		return nil, resp, err
 	}
 
-	return ps, resp, nil
+	return ps, resp, err
 }
 
 // GetSnippet gets a single project snippet
@@ -81,7 +81,7 @@ func (s *ProjectSnippetsService) GetSnippet(pid interface{}, snippet int, option
 		return nil, resp, err
 	}
 
-	return ps, resp, nil
+	return ps, resp, err
 }
 
 // CreateProjectSnippetOptions represents the available CreateSnippet() options.
@@ -120,7 +120,7 @@ func (s *ProjectSnippetsService) CreateSnippet(pid interface{}, opt *CreateProje
 		return nil, resp, err
 	}
 
-	return ps, resp, nil
+	return ps, resp, err
 }
 
 // UpdateProjectSnippetOptions represents the available UpdateSnippet() options.
@@ -159,7 +159,7 @@ func (s *ProjectSnippetsService) UpdateSnippet(pid interface{}, snippet int, opt
 		return nil, resp, err
 	}
 
-	return ps, resp, nil
+	return ps, resp, err
 }
 
 // DeleteSnippet deletes an existing project snippet. This is an idempotent
diff --git a/project_templates.go b/project_templates.go
index 86010bd..0501660 100644
--- a/project_templates.go
+++ b/project_templates.go
@@ -81,7 +81,7 @@ func (s *ProjectTemplatesService) ListTemplates(pid interface{}, templateType st
 		return nil, resp, err
 	}
 
-	return pt, resp, nil
+	return pt, resp, err
 }
 
 // GetProjectTemplate gets a single project template.
@@ -106,5 +106,5 @@ func (s *ProjectTemplatesService) GetProjectTemplate(pid interface{}, templateTy
 		return nil, resp, err
 	}
 
-	return ptd, resp, nil
+	return ptd, resp, err
 }
diff --git a/project_variables.go b/project_variables.go
index 2a16f5a..693a0f7 100644
--- a/project_variables.go
+++ b/project_variables.go
@@ -83,7 +83,7 @@ func (s *ProjectVariablesService) ListVariables(pid interface{}, opt *ListProjec
 		return nil, resp, err
 	}
 
-	return vs, resp, nil
+	return vs, resp, err
 }
 
 // GetProjectVariableOptions represents the available GetVariable()
@@ -117,7 +117,7 @@ func (s *ProjectVariablesService) GetVariable(pid interface{}, key string, opt *
 		return nil, resp, err
 	}
 
-	return v, resp, nil
+	return v, resp, err
 }
 
 // CreateProjectVariableOptions represents the available CreateVariable()
@@ -157,7 +157,7 @@ func (s *ProjectVariablesService) CreateVariable(pid interface{}, opt *CreatePro
 		return nil, resp, err
 	}
 
-	return v, resp, nil
+	return v, resp, err
 }
 
 // UpdateProjectVariableOptions represents the available UpdateVariable()
@@ -197,7 +197,7 @@ func (s *ProjectVariablesService) UpdateVariable(pid interface{}, key string, op
 		return nil, resp, err
 	}
 
-	return v, resp, nil
+	return v, resp, err
 }
 
 // RemoveProjectVariableOptions represents the available RemoveVariable()
diff --git a/project_vulnerabilities.go b/project_vulnerabilities.go
index f46f36f..168ee1a 100644
--- a/project_vulnerabilities.go
+++ b/project_vulnerabilities.go
@@ -112,7 +112,7 @@ func (s *ProjectVulnerabilitiesService) ListProjectVulnerabilities(pid interface
 		return nil, resp, err
 	}
 
-	return p, resp, nil
+	return p, resp, err
 }
 
 // CreateVulnerabilityOptions represents the available CreateVulnerability()
@@ -146,5 +146,5 @@ func (s *ProjectVulnerabilitiesService) CreateVulnerability(pid interface{}, opt
 		return nil, resp, err
 	}
 
-	return p, resp, nil
+	return p, resp, err
 }
diff --git a/projects.go b/projects.go
index cbe6763..662a67c 100644
--- a/projects.go
+++ b/projects.go
@@ -360,7 +360,7 @@ func (s *ProjectsService) ListProjects(opt *ListProjectsOptions, options ...Requ
 		return nil, resp, err
 	}
 
-	return p, resp, nil
+	return p, resp, err
 }
 
 // ListUserProjects gets a list of projects for the given user.
@@ -385,7 +385,7 @@ func (s *ProjectsService) ListUserProjects(uid interface{}, opt *ListProjectsOpt
 		return nil, resp, err
 	}
 
-	return p, resp, nil
+	return p, resp, err
 }
 
 // ListUserStarredProjects gets a list of projects starred by the given user.
@@ -410,7 +410,7 @@ func (s *ProjectsService) ListUserStarredProjects(uid interface{}, opt *ListProj
 		return nil, resp, err
 	}
 
-	return p, resp, nil
+	return p, resp, err
 }
 
 // ProjectUser represents a GitLab project user.
@@ -453,7 +453,7 @@ func (s *ProjectsService) ListProjectsUsers(pid interface{}, opt *ListProjectUse
 		return nil, resp, err
 	}
 
-	return p, resp, nil
+	return p, resp, err
 }
 
 // ProjectGroup represents a GitLab project group.
@@ -500,7 +500,7 @@ func (s *ProjectsService) ListProjectsGroups(pid interface{}, opt *ListProjectGr
 		return nil, resp, err
 	}
 
-	return p, resp, nil
+	return p, resp, err
 }
 
 // ProjectLanguages is a map of strings because the response is arbitrary
@@ -529,7 +529,7 @@ func (s *ProjectsService) GetProjectLanguages(pid interface{}, options ...Reques
 		return nil, resp, err
 	}
 
-	return p, resp, nil
+	return p, resp, err
 }
 
 // GetProjectOptions represents the available GetProject() options.
@@ -564,7 +564,7 @@ func (s *ProjectsService) GetProject(pid interface{}, opt *GetProjectOptions, op
 		return nil, resp, err
 	}
 
-	return p, resp, nil
+	return p, resp, err
 }
 
 // CreateProjectOptions represents the available CreateProject() options.
@@ -735,7 +735,7 @@ func (s *ProjectsService) CreateProject(opt *CreateProjectOptions, options ...Re
 		return nil, resp, err
 	}
 
-	return p, resp, nil
+	return p, resp, err
 }
 
 // CreateProjectForUserOptions represents the available CreateProjectForUser()
@@ -784,7 +784,7 @@ func (s *ProjectsService) CreateProjectForUser(user int, opt *CreateProjectForUs
 		return nil, resp, err
 	}
 
-	return p, resp, nil
+	return p, resp, err
 }
 
 // EditProjectOptions represents the available EditProject() options.
@@ -925,7 +925,7 @@ func (s *ProjectsService) EditProject(pid interface{}, opt *EditProjectOptions,
 		return nil, resp, err
 	}
 
-	return p, resp, nil
+	return p, resp, err
 }
 
 // ForkProjectOptions represents the available ForkProject() options.
@@ -966,7 +966,7 @@ func (s *ProjectsService) ForkProject(pid interface{}, opt *ForkProjectOptions,
 		return nil, resp, err
 	}
 
-	return p, resp, nil
+	return p, resp, err
 }
 
 // StarProject stars a given the project.
@@ -991,7 +991,7 @@ func (s *ProjectsService) StarProject(pid interface{}, options ...RequestOptionF
 		return nil, resp, err
 	}
 
-	return p, resp, nil
+	return p, resp, err
 }
 
 // UnstarProject unstars a given project.
@@ -1016,7 +1016,7 @@ func (s *ProjectsService) UnstarProject(pid interface{}, options ...RequestOptio
 		return nil, resp, err
 	}
 
-	return p, resp, nil
+	return p, resp, err
 }
 
 // ArchiveProject archives the project if the user is either admin or the
@@ -1042,7 +1042,7 @@ func (s *ProjectsService) ArchiveProject(pid interface{}, options ...RequestOpti
 		return nil, resp, err
 	}
 
-	return p, resp, nil
+	return p, resp, err
 }
 
 // UnarchiveProject unarchives the project if the user is either admin or
@@ -1068,7 +1068,7 @@ func (s *ProjectsService) UnarchiveProject(pid interface{}, options ...RequestOp
 		return nil, resp, err
 	}
 
-	return p, resp, nil
+	return p, resp, err
 }
 
 // DeleteProject removes a project including all associated resources
@@ -1204,7 +1204,7 @@ func (s *ProjectsService) ListProjectHooks(pid interface{}, opt *ListProjectHook
 		return nil, resp, err
 	}
 
-	return ph, resp, nil
+	return ph, resp, err
 }
 
 // GetProjectHook gets a specific hook for a project.
@@ -1229,7 +1229,7 @@ func (s *ProjectsService) GetProjectHook(pid interface{}, hook int, options ...R
 		return nil, resp, err
 	}
 
-	return ph, resp, nil
+	return ph, resp, err
 }
 
 // AddProjectHookOptions represents the available AddProjectHook() options.
@@ -1277,7 +1277,7 @@ func (s *ProjectsService) AddProjectHook(pid interface{}, opt *AddProjectHookOpt
 		return nil, resp, err
 	}
 
-	return ph, resp, nil
+	return ph, resp, err
 }
 
 // EditProjectHookOptions represents the available EditProjectHook() options.
@@ -1325,7 +1325,7 @@ func (s *ProjectsService) EditProjectHook(pid interface{}, hook int, opt *EditPr
 		return nil, resp, err
 	}
 
-	return ph, resp, nil
+	return ph, resp, err
 }
 
 // DeleteProjectHook removes a hook from a project. This is an idempotent
@@ -1383,7 +1383,7 @@ func (s *ProjectsService) CreateProjectForkRelation(pid interface{}, fork int, o
 		return nil, resp, err
 	}
 
-	return pfr, resp, nil
+	return pfr, resp, err
 }
 
 // DeleteProjectForkRelation deletes an existing forked from relationship.
@@ -1476,7 +1476,7 @@ func (s *ProjectsService) UploadAvatar(pid interface{}, avatar io.Reader, filena
 		return nil, resp, err
 	}
 
-	return p, resp, nil
+	return p, resp, err
 }
 
 // ListProjectForks gets a list of project forks.
@@ -1501,7 +1501,7 @@ func (s *ProjectsService) ListProjectForks(pid interface{}, opt *ListProjectsOpt
 		return nil, resp, err
 	}
 
-	return forks, resp, nil
+	return forks, resp, err
 }
 
 // ProjectPushRules represents a project push rule.
@@ -1547,7 +1547,7 @@ func (s *ProjectsService) GetProjectPushRules(pid interface{}, options ...Reques
 		return nil, resp, err
 	}
 
-	return ppr, resp, nil
+	return ppr, resp, err
 }
 
 // AddProjectPushRuleOptions represents the available AddProjectPushRule()
@@ -1591,7 +1591,7 @@ func (s *ProjectsService) AddProjectPushRule(pid interface{}, opt *AddProjectPus
 		return nil, resp, err
 	}
 
-	return ppr, resp, nil
+	return ppr, resp, err
 }
 
 // EditProjectPushRuleOptions represents the available EditProjectPushRule()
@@ -1635,7 +1635,7 @@ func (s *ProjectsService) EditProjectPushRule(pid interface{}, opt *EditProjectP
 		return nil, resp, err
 	}
 
-	return ppr, resp, nil
+	return ppr, resp, err
 }
 
 // DeleteProjectPushRule removes a push rule from a project. This is an
@@ -1697,7 +1697,7 @@ func (s *ProjectsService) GetApprovalConfiguration(pid interface{}, options ...R
 		return nil, resp, err
 	}
 
-	return pa, resp, nil
+	return pa, resp, err
 }
 
 // ChangeApprovalConfigurationOptions represents the available
@@ -1737,7 +1737,7 @@ func (s *ProjectsService) ChangeApprovalConfiguration(pid interface{}, opt *Chan
 		return nil, resp, err
 	}
 
-	return pa, resp, nil
+	return pa, resp, err
 }
 
 // GetProjectApprovalRulesListsOptions represents the available GetProjectApprovalRules() options.
@@ -1767,7 +1767,7 @@ func (s *ProjectsService) GetProjectApprovalRules(pid interface{}, opt *GetProje
 		return nil, resp, err
 	}
 
-	return par, resp, nil
+	return par, resp, err
 }
 
 // GetProjectApprovalRule gets the project level approvers.
@@ -1792,7 +1792,7 @@ func (s *ProjectsService) GetProjectApprovalRule(pid interface{}, ruleID int, op
 		return nil, resp, err
 	}
 
-	return par, resp, nil
+	return par, resp, err
 }
 
 // CreateProjectLevelRuleOptions represents the available CreateProjectApprovalRule()
@@ -1832,7 +1832,7 @@ func (s *ProjectsService) CreateProjectApprovalRule(pid interface{}, opt *Create
 		return nil, resp, err
 	}
 
-	return par, resp, nil
+	return par, resp, err
 }
 
 // UpdateProjectLevelRuleOptions represents the available UpdateProjectApprovalRule()
@@ -1871,7 +1871,7 @@ func (s *ProjectsService) UpdateProjectApprovalRule(pid interface{}, approvalRul
 		return nil, resp, err
 	}
 
-	return par, resp, nil
+	return par, resp, err
 }
 
 // DeleteProjectApprovalRule deletes a project-level approval rule.
@@ -1925,7 +1925,7 @@ func (s *ProjectsService) ChangeAllowedApprovers(pid interface{}, opt *ChangeAll
 		return nil, resp, err
 	}
 
-	return pa, resp, nil
+	return pa, resp, err
 }
 
 // ProjectPullMirrorDetails represent the details of the configuration pull
@@ -1965,7 +1965,7 @@ func (s *ProjectsService) GetProjectPullMirrorDetails(pid interface{}, options .
 		return nil, resp, err
 	}
 
-	return pmd, resp, nil
+	return pmd, resp, err
 }
 
 // StartMirroringProject start the pull mirroring process for a project.
@@ -1989,7 +1989,7 @@ func (s *ProjectsService) StartMirroringProject(pid interface{}, options ...Requ
 		return resp, err
 	}
 
-	return resp, nil
+	return resp, err
 }
 
 // TransferProjectOptions represents the available TransferProject() options.
@@ -2020,7 +2020,7 @@ func (s *ProjectsService) TransferProject(pid interface{}, opt *TransferProjectO
 		return nil, resp, err
 	}
 
-	return p, resp, nil
+	return p, resp, err
 }
 
 // StartHousekeepingProject start the Housekeeping task for a project.
@@ -2071,5 +2071,5 @@ func (s *ProjectsService) GetRepositoryStorage(pid interface{}, options ...Reque
 		return nil, resp, err
 	}
 
-	return prs, resp, nil
+	return prs, resp, err
 }
diff --git a/protected_branches.go b/protected_branches.go
index d13f57a..b398bdb 100644
--- a/protected_branches.go
+++ b/protected_branches.go
@@ -90,7 +90,7 @@ func (s *ProtectedBranchesService) ListProtectedBranches(pid interface{}, opt *L
 		return nil, resp, err
 	}
 
-	return p, resp, nil
+	return p, resp, err
 }
 
 // GetProtectedBranch gets a single protected branch or wildcard protected branch.
@@ -115,7 +115,7 @@ func (s *ProtectedBranchesService) GetProtectedBranch(pid interface{}, branch st
 		return nil, resp, err
 	}
 
-	return p, resp, nil
+	return p, resp, err
 }
 
 // ProtectRepositoryBranchesOptions represents the available
@@ -171,7 +171,7 @@ func (s *ProtectedBranchesService) ProtectRepositoryBranches(pid interface{}, op
 		return nil, resp, err
 	}
 
-	return p, resp, nil
+	return p, resp, err
 }
 
 // UnprotectRepositoryBranches unprotects the given protected branch or wildcard
@@ -230,7 +230,7 @@ func (s *ProtectedBranchesService) UpdateProtectedBranch(pid interface{}, branch
 		return nil, resp, err
 	}
 
-	return p, resp, nil
+	return p, resp, err
 }
 
 // RequireCodeOwnerApprovalsOptions represents the available
diff --git a/protected_environments.go b/protected_environments.go
index 5e5962b..70affe1 100644
--- a/protected_environments.go
+++ b/protected_environments.go
@@ -82,7 +82,7 @@ func (s *ProtectedEnvironmentsService) ListProtectedEnvironments(pid interface{}
 		return nil, resp, err
 	}
 
-	return pes, resp, nil
+	return pes, resp, err
 }
 
 // GetProtectedEnvironment returns a single protected environment or wildcard
@@ -108,7 +108,7 @@ func (s *ProtectedEnvironmentsService) GetProtectedEnvironment(pid interface{},
 		return nil, resp, err
 	}
 
-	return pe, resp, nil
+	return pe, resp, err
 }
 
 // ProtectRepositoryEnvironmentsOptions represents the available
@@ -156,7 +156,7 @@ func (s *ProtectedEnvironmentsService) ProtectRepositoryEnvironments(pid interfa
 		return nil, resp, err
 	}
 
-	return pe, resp, nil
+	return pe, resp, err
 }
 
 // UnprotectEnvironment unprotects the given protected environment or wildcard
diff --git a/protected_tags.go b/protected_tags.go
index 62da5c4..4f8fb4e 100644
--- a/protected_tags.go
+++ b/protected_tags.go
@@ -79,7 +79,7 @@ func (s *ProtectedTagsService) ListProtectedTags(pid interface{}, opt *ListProte
 		return nil, resp, err
 	}
 
-	return pts, resp, nil
+	return pts, resp, err
 }
 
 // GetProtectedTag returns a single protected tag or wildcard protected tag.
@@ -104,7 +104,7 @@ func (s *ProtectedTagsService) GetProtectedTag(pid interface{}, tag string, opti
 		return nil, resp, err
 	}
 
-	return pt, resp, nil
+	return pt, resp, err
 }
 
 // ProtectRepositoryTagsOptions represents the available ProtectRepositoryTags()
@@ -151,7 +151,7 @@ func (s *ProtectedTagsService) ProtectRepositoryTags(pid interface{}, opt *Prote
 		return nil, resp, err
 	}
 
-	return pt, resp, nil
+	return pt, resp, err
 }
 
 // UnprotectRepositoryTags unprotects the given protected tag or wildcard
diff --git a/releaselinks.go b/releaselinks.go
index f7dd05f..d85e493 100644
--- a/releaselinks.go
+++ b/releaselinks.go
@@ -67,7 +67,7 @@ func (s *ReleaseLinksService) ListReleaseLinks(pid interface{}, tagName string,
 		return nil, resp, err
 	}
 
-	return rls, resp, nil
+	return rls, resp, err
 }
 
 // GetReleaseLink returns a link from release assets.
@@ -94,7 +94,7 @@ func (s *ReleaseLinksService) GetReleaseLink(pid interface{}, tagName string, li
 		return nil, resp, err
 	}
 
-	return rl, resp, nil
+	return rl, resp, err
 }
 
 // CreateReleaseLinkOptions represents CreateReleaseLink() options.
@@ -128,7 +128,7 @@ func (s *ReleaseLinksService) CreateReleaseLink(pid interface{}, tagName string,
 		return nil, resp, err
 	}
 
-	return rl, resp, nil
+	return rl, resp, err
 }
 
 // UpdateReleaseLinkOptions represents UpdateReleaseLink() options.
@@ -167,7 +167,7 @@ func (s *ReleaseLinksService) UpdateReleaseLink(pid interface{}, tagName string,
 		return nil, resp, err
 	}
 
-	return rl, resp, nil
+	return rl, resp, err
 }
 
 // DeleteReleaseLink deletes a link from release.
@@ -195,5 +195,5 @@ func (s *ReleaseLinksService) DeleteReleaseLink(pid interface{}, tagName string,
 		return nil, resp, err
 	}
 
-	return rl, resp, nil
+	return rl, resp, err
 }
diff --git a/releases.go b/releases.go
index 86308c5..ef3efa2 100644
--- a/releases.go
+++ b/releases.go
@@ -105,7 +105,7 @@ func (s *ReleasesService) ListReleases(pid interface{}, opt *ListReleasesOptions
 		return nil, resp, err
 	}
 
-	return rs, resp, nil
+	return rs, resp, err
 }
 
 // GetRelease returns a single release, identified by a tag name.
@@ -130,7 +130,7 @@ func (s *ReleasesService) GetRelease(pid interface{}, tagName string, options ..
 		return nil, resp, err
 	}
 
-	return r, resp, nil
+	return r, resp, err
 }
 
 // CreateReleaseOptions represents CreateRelease() options.
@@ -190,7 +190,7 @@ func (s *ReleasesService) CreateRelease(pid interface{}, opts *CreateReleaseOpti
 		return nil, resp, err
 	}
 
-	return r, resp, nil
+	return r, resp, err
 }
 
 // UpdateReleaseOptions represents UpdateRelease() options.
@@ -226,7 +226,7 @@ func (s *ReleasesService) UpdateRelease(pid interface{}, tagName string, opts *U
 		return nil, resp, err
 	}
 
-	return r, resp, nil
+	return r, resp, err
 }
 
 // DeleteRelease deletes a release.
@@ -251,5 +251,5 @@ func (s *ReleasesService) DeleteRelease(pid interface{}, tagName string, options
 		return nil, resp, err
 	}
 
-	return r, resp, nil
+	return r, resp, err
 }
diff --git a/repositories.go b/repositories.go
index b89efc0..2dc5d9e 100644
--- a/repositories.go
+++ b/repositories.go
@@ -80,7 +80,7 @@ func (s *RepositoriesService) ListTree(pid interface{}, opt *ListTreeOptions, op
 		return nil, resp, err
 	}
 
-	return t, resp, nil
+	return t, resp, err
 }
 
 // Blob gets information about blob in repository like size and content. Note
@@ -246,7 +246,7 @@ func (s *RepositoriesService) Compare(pid interface{}, opt *CompareOptions, opti
 		return nil, resp, err
 	}
 
-	return c, resp, nil
+	return c, resp, err
 }
 
 // Contributor represents a GitLap contributor.
@@ -294,7 +294,7 @@ func (s *RepositoriesService) Contributors(pid interface{}, opt *ListContributor
 		return nil, resp, err
 	}
 
-	return c, resp, nil
+	return c, resp, err
 }
 
 // MergeBaseOptions represents the available MergeBase() options.
@@ -328,7 +328,7 @@ func (s *RepositoriesService) MergeBase(pid interface{}, opt *MergeBaseOptions,
 		return nil, resp, err
 	}
 
-	return c, resp, nil
+	return c, resp, err
 }
 
 // AddChangelogOptions represents the available AddChangelog() options.
@@ -415,5 +415,5 @@ func (s *RepositoriesService) GenerateChangelogData(pid interface{}, opt Generat
 		return nil, resp, err
 	}
 
-	return cd, resp, nil
+	return cd, resp, err
 }
diff --git a/repository_files.go b/repository_files.go
index fd96fa4..390b22e 100644
--- a/repository_files.go
+++ b/repository_files.go
@@ -88,7 +88,7 @@ func (s *RepositoryFilesService) GetFile(pid interface{}, fileName string, opt *
 		return nil, resp, err
 	}
 
-	return f, resp, nil
+	return f, resp, err
 }
 
 // GetFileMetaDataOptions represents the available GetFileMetaData() options.
@@ -144,7 +144,7 @@ func (s *RepositoryFilesService) GetFileMetaData(pid interface{}, fileName strin
 		}
 	}
 
-	return f, resp, nil
+	return f, resp, err
 }
 
 // FileBlameRange represents one item of blame information.
@@ -204,7 +204,7 @@ func (s *RepositoryFilesService) GetFileBlame(pid interface{}, file string, opt
 		return nil, resp, err
 	}
 
-	return br, resp, nil
+	return br, resp, err
 }
 
 // GetRawFileOptions represents the available GetRawFile() options.
@@ -297,7 +297,7 @@ func (s *RepositoryFilesService) CreateFile(pid interface{}, fileName string, op
 		return nil, resp, err
 	}
 
-	return f, resp, nil
+	return f, resp, err
 }
 
 // UpdateFileOptions represents the available UpdateFile() options.
@@ -342,7 +342,7 @@ func (s *RepositoryFilesService) UpdateFile(pid interface{}, fileName string, op
 		return nil, resp, err
 	}
 
-	return f, resp, nil
+	return f, resp, err
 }
 
 // DeleteFileOptions represents the available DeleteFile() options.
diff --git a/repository_submodules.go b/repository_submodules.go
index 7022a45..70ac05e 100644
--- a/repository_submodules.go
+++ b/repository_submodules.go
@@ -89,5 +89,5 @@ func (s *RepositorySubmodulesService) UpdateSubmodule(pid interface{}, submodule
 		return nil, resp, err
 	}
 
-	return sc, resp, nil
+	return sc, resp, err
 }
diff --git a/resource_label_events.go b/resource_label_events.go
index 46c96fc..37da156 100644
--- a/resource_label_events.go
+++ b/resource_label_events.go
@@ -89,7 +89,7 @@ func (s *ResourceLabelEventsService) ListIssueLabelEvents(pid interface{}, issue
 		return nil, resp, err
 	}
 
-	return ls, resp, nil
+	return ls, resp, err
 }
 
 // GetIssueLabelEvent gets a single issue-label-event.
@@ -114,7 +114,7 @@ func (s *ResourceLabelEventsService) GetIssueLabelEvent(pid interface{}, issue i
 		return nil, resp, err
 	}
 
-	return l, resp, nil
+	return l, resp, err
 }
 
 // ListGroupEpicLabelEvents retrieves resource label events for the specified
@@ -140,7 +140,7 @@ func (s *ResourceLabelEventsService) ListGroupEpicLabelEvents(gid interface{}, e
 		return nil, resp, err
 	}
 
-	return ls, resp, nil
+	return ls, resp, err
 }
 
 // GetGroupEpicLabelEvent gets a single group epic label event.
@@ -165,7 +165,7 @@ func (s *ResourceLabelEventsService) GetGroupEpicLabelEvent(gid interface{}, epi
 		return nil, resp, err
 	}
 
-	return l, resp, nil
+	return l, resp, err
 }
 
 // ListMergeRequestsLabelEvents retrieves resource label events for the specified
@@ -191,7 +191,7 @@ func (s *ResourceLabelEventsService) ListMergeRequestsLabelEvents(pid interface{
 		return nil, resp, err
 	}
 
-	return ls, resp, nil
+	return ls, resp, err
 }
 
 // GetMergeRequestLabelEvent gets a single merge request label event.
@@ -216,5 +216,5 @@ func (s *ResourceLabelEventsService) GetMergeRequestLabelEvent(pid interface{},
 		return nil, resp, err
 	}
 
-	return l, resp, nil
+	return l, resp, err
 }
diff --git a/resource_milestone_events.go b/resource_milestone_events.go
index 22925bb..9c08830 100644
--- a/resource_milestone_events.go
+++ b/resource_milestone_events.go
@@ -75,7 +75,7 @@ func (s *ResourceMilestoneEventsService) ListIssueMilestoneEvents(pid interface{
 		return nil, resp, err
 	}
 
-	return mes, resp, nil
+	return mes, resp, err
 }
 
 // GetIssueMilestoneEvent gets a single issue milestone event.
@@ -100,7 +100,7 @@ func (s *ResourceMilestoneEventsService) GetIssueMilestoneEvent(pid interface{},
 		return nil, resp, err
 	}
 
-	return me, resp, nil
+	return me, resp, err
 }
 
 // ListMergeMilestoneEvents retrieves resource milestone events for the specified
@@ -126,7 +126,7 @@ func (s *ResourceMilestoneEventsService) ListMergeMilestoneEvents(pid interface{
 		return nil, resp, err
 	}
 
-	return mes, resp, nil
+	return mes, resp, err
 }
 
 // GetMergeRequestMilestoneEvent gets a single merge request milestone event.
@@ -151,5 +151,5 @@ func (s *ResourceMilestoneEventsService) GetMergeRequestMilestoneEvent(pid inter
 		return nil, resp, err
 	}
 
-	return me, resp, nil
+	return me, resp, err
 }
diff --git a/resource_state_events.go b/resource_state_events.go
index 867fd6d..e73ef77 100644
--- a/resource_state_events.go
+++ b/resource_state_events.go
@@ -74,7 +74,7 @@ func (s *ResourceStateEventsService) ListIssueStateEvents(pid interface{}, issue
 		return nil, resp, err
 	}
 
-	return ses, resp, nil
+	return ses, resp, err
 }
 
 // GetIssueStateEvent gets a single issue-state-event.
@@ -99,7 +99,7 @@ func (s *ResourceStateEventsService) GetIssueStateEvent(pid interface{}, issue i
 		return nil, resp, err
 	}
 
-	return se, resp, nil
+	return se, resp, err
 }
 
 // ListMergeStateEvents retrieves resource state events for the specified
@@ -125,7 +125,7 @@ func (s *ResourceStateEventsService) ListMergeStateEvents(pid interface{}, reque
 		return nil, resp, err
 	}
 
-	return ses, resp, nil
+	return ses, resp, err
 }
 
 // GetMergeRequestStateEvent gets a single merge request state event.
@@ -150,5 +150,5 @@ func (s *ResourceStateEventsService) GetMergeRequestStateEvent(pid interface{},
 		return nil, resp, err
 	}
 
-	return se, resp, nil
+	return se, resp, err
 }
diff --git a/resource_weight_events.go b/resource_weight_events.go
index 1251836..e1a4bf5 100644
--- a/resource_weight_events.go
+++ b/resource_weight_events.go
@@ -76,5 +76,5 @@ func (s *ResourceWeightEventsService) ListIssueWeightEvents(pid interface{}, iss
 		return nil, resp, err
 	}
 
-	return wes, resp, nil
+	return wes, resp, err
 }
diff --git a/runners.go b/runners.go
index 5224cf9..bb083d4 100644
--- a/runners.go
+++ b/runners.go
@@ -120,7 +120,7 @@ func (s *RunnersService) ListRunners(opt *ListRunnersOptions, options ...Request
 		return nil, resp, err
 	}
 
-	return rs, resp, nil
+	return rs, resp, err
 }
 
 // ListAllRunners gets a list of all runners in the GitLab instance. Access is
@@ -140,7 +140,7 @@ func (s *RunnersService) ListAllRunners(opt *ListRunnersOptions, options ...Requ
 		return nil, resp, err
 	}
 
-	return rs, resp, nil
+	return rs, resp, err
 }
 
 // GetRunnerDetails returns details for given runner.
@@ -165,7 +165,7 @@ func (s *RunnersService) GetRunnerDetails(rid interface{}, options ...RequestOpt
 		return nil, resp, err
 	}
 
-	return rs, resp, nil
+	return rs, resp, err
 }
 
 // UpdateRunnerDetailsOptions represents the available UpdateRunnerDetails() options.
@@ -207,7 +207,7 @@ func (s *RunnersService) UpdateRunnerDetails(rid interface{}, opt *UpdateRunnerD
 		return nil, resp, err
 	}
 
-	return rs, resp, nil
+	return rs, resp, err
 }
 
 // RemoveRunner removes a runner.
@@ -263,7 +263,7 @@ func (s *RunnersService) ListRunnerJobs(rid interface{}, opt *ListRunnerJobsOpti
 		return nil, resp, err
 	}
 
-	return rs, resp, nil
+	return rs, resp, err
 }
 
 // ListProjectRunnersOptions represents the available ListProjectRunners()
@@ -295,7 +295,7 @@ func (s *RunnersService) ListProjectRunners(pid interface{}, opt *ListProjectRun
 		return nil, resp, err
 	}
 
-	return rs, resp, nil
+	return rs, resp, err
 }
 
 // EnableProjectRunnerOptions represents the available EnableProjectRunner()
@@ -329,7 +329,7 @@ func (s *RunnersService) EnableProjectRunner(pid interface{}, opt *EnableProject
 		return nil, resp, err
 	}
 
-	return r, resp, nil
+	return r, resp, err
 }
 
 // DisableProjectRunner disables a specific runner from project.
@@ -386,7 +386,7 @@ func (s *RunnersService) ListGroupsRunners(gid interface{}, opt *ListGroupsRunne
 		return nil, resp, err
 	}
 
-	return rs, resp, nil
+	return rs, resp, err
 }
 
 // RegisterNewRunnerOptions represents the available RegisterNewRunner()
@@ -437,7 +437,7 @@ func (s *RunnersService) RegisterNewRunner(opt *RegisterNewRunnerOptions, option
 		return nil, resp, err
 	}
 
-	return r, resp, nil
+	return r, resp, err
 }
 
 // DeleteRegisteredRunnerOptions represents the available
@@ -519,7 +519,7 @@ func (s *RunnersService) ResetInstanceRunnerRegistrationToken(options ...Request
 		return nil, resp, err
 	}
 
-	return r, resp, nil
+	return r, resp, err
 }
 
 // ResetGroupRunnerRegistrationToken resets a group's runner registration token.
@@ -544,7 +544,7 @@ func (s *RunnersService) ResetGroupRunnerRegistrationToken(gid interface{}, opti
 		return nil, resp, err
 	}
 
-	return r, resp, nil
+	return r, resp, err
 }
 
 // ResetGroupRunnerRegistrationToken resets a projects's runner registration token.
@@ -568,7 +568,7 @@ func (s *RunnersService) ResetProjectRunnerRegistrationToken(pid interface{}, op
 		return nil, resp, err
 	}
 
-	return r, resp, nil
+	return r, resp, err
 }
 
 type RunnerAuthenticationToken struct {
@@ -593,5 +593,5 @@ func (s *RunnersService) ResetRunnerAuthenticationToken(rid int, options ...Requ
 		return nil, resp, err
 	}
 
-	return r, resp, nil
+	return r, resp, err
 }
diff --git a/services.go b/services.go
index 6d2d26b..9b25201 100644
--- a/services.go
+++ b/services.go
@@ -78,7 +78,7 @@ func (s *ServicesService) ListServices(pid interface{}, options ...RequestOption
 		return nil, resp, err
 	}
 
-	return svcs, resp, nil
+	return svcs, resp, err
 }
 
 // CustomIssueTrackerService represents Custom Issue Tracker service settings.
@@ -122,7 +122,7 @@ func (s *ServicesService) GetCustomIssueTrackerService(pid interface{}, options
 		return nil, resp, err
 	}
 
-	return svc, resp, nil
+	return svc, resp, err
 }
 
 // SetCustomIssueTrackerServiceOptions represents the available SetCustomIssueTrackerService()
@@ -218,7 +218,7 @@ func (s *ServicesService) GetDroneCIService(pid interface{}, options ...RequestO
 		return nil, resp, err
 	}
 
-	return svc, resp, nil
+	return svc, resp, err
 }
 
 // SetDroneCIServiceOptions represents the available SetDroneCIService()
@@ -314,7 +314,7 @@ func (s *ServicesService) GetEmailsOnPushService(pid interface{}, options ...Req
 		return nil, resp, err
 	}
 
-	return svc, resp, nil
+	return svc, resp, err
 }
 
 // SetEmailsOnPushServiceOptions represents the available SetEmailsOnPushService()
@@ -408,7 +408,7 @@ func (s *ServicesService) GetExternalWikiService(pid interface{}, options ...Req
 		return nil, resp, err
 	}
 
-	return svc, resp, nil
+	return svc, resp, err
 }
 
 // SetExternalWikiServiceOptions represents the available SetExternalWikiService()
@@ -498,7 +498,7 @@ func (s *ServicesService) GetGithubService(pid interface{}, options ...RequestOp
 		return nil, resp, err
 	}
 
-	return svc, resp, nil
+	return svc, resp, err
 }
 
 // SetGithubServiceOptions represents the available SetGithubService()
@@ -687,7 +687,7 @@ func (s *ServicesService) GetJenkinsCIService(pid interface{}, options ...Reques
 		return nil, resp, err
 	}
 
-	return svc, resp, nil
+	return svc, resp, err
 }
 
 // SetJenkinsCIServiceOptions represents the available SetJenkinsCIService()
@@ -817,7 +817,7 @@ func (s *ServicesService) GetJiraService(pid interface{}, options ...RequestOpti
 		return nil, resp, err
 	}
 
-	return svc, resp, nil
+	return svc, resp, err
 }
 
 // SetJiraServiceOptions represents the available SetJiraService()
@@ -928,7 +928,7 @@ func (s *ServicesService) GetMattermostService(pid interface{}, options ...Reque
 		return nil, resp, err
 	}
 
-	return svc, resp, nil
+	return svc, resp, err
 }
 
 // SetMattermostServiceOptions represents the available SetMattermostService()
@@ -1049,7 +1049,7 @@ func (s *ServicesService) GetMicrosoftTeamsService(pid interface{}, options ...R
 		return nil, resp, err
 	}
 
-	return svc, resp, nil
+	return svc, resp, err
 }
 
 // SetMicrosoftTeamsServiceOptions represents the available SetMicrosoftTeamsService()
@@ -1151,7 +1151,7 @@ func (s *ServicesService) GetPipelinesEmailService(pid interface{}, options ...R
 		return nil, resp, err
 	}
 
-	return svc, resp, nil
+	return svc, resp, err
 }
 
 // SetPipelinesEmailServiceOptions represents the available
@@ -1247,7 +1247,7 @@ func (s *ServicesService) GetPrometheusService(pid interface{}, options ...Reque
 		return nil, resp, err
 	}
 
-	return svc, resp, nil
+	return svc, resp, err
 }
 
 // SetPrometheusServiceOptions represents the available SetPrometheusService()
@@ -1353,7 +1353,7 @@ func (s *ServicesService) GetSlackService(pid interface{}, options ...RequestOpt
 		return nil, resp, err
 	}
 
-	return svc, resp, nil
+	return svc, resp, err
 }
 
 // SetSlackServiceOptions represents the available SetSlackService()
@@ -1470,7 +1470,7 @@ func (s *ServicesService) GetSlackSlashCommandsService(pid interface{}, options
 		return nil, resp, err
 	}
 
-	return svc, resp, nil
+	return svc, resp, err
 }
 
 // SetSlackSlashCommandsServiceOptions represents the available SetSlackSlashCommandsService()
@@ -1560,7 +1560,7 @@ func (s *ServicesService) GetMattermostSlashCommandsService(pid interface{}, opt
 		return nil, resp, err
 	}
 
-	return svc, resp, nil
+	return svc, resp, err
 }
 
 // SetMattermostSlashCommandsServiceOptions represents the available SetSlackSlashCommandsService()
@@ -1653,7 +1653,7 @@ func (s *ServicesService) GetYouTrackService(pid interface{}, options ...Request
 		return nil, resp, err
 	}
 
-	return svc, resp, nil
+	return svc, resp, err
 }
 
 // SetYouTrackServiceOptions represents the available SetYouTrackService()
diff --git a/settings.go b/settings.go
index 3ac4ead..deddf49 100644
--- a/settings.go
+++ b/settings.go
@@ -411,7 +411,7 @@ func (s *SettingsService) GetSettings(options ...RequestOptionFunc) (*Settings,
 		return nil, resp, err
 	}
 
-	return as, resp, nil
+	return as, resp, err
 }
 
 // UpdateSettingsOptions represents the available UpdateSettings() options.
@@ -773,5 +773,5 @@ func (s *SettingsService) UpdateSettings(opt *UpdateSettingsOptions, options ...
 		return nil, resp, err
 	}
 
-	return as, resp, nil
+	return as, resp, err
 }
diff --git a/sidekiq_metrics.go b/sidekiq_metrics.go
index d7a7834..9b111c8 100644
--- a/sidekiq_metrics.go
+++ b/sidekiq_metrics.go
@@ -56,7 +56,7 @@ func (s *SidekiqService) GetQueueMetrics(options ...RequestOptionFunc) (*QueueMe
 		return nil, resp, err
 	}
 
-	return q, resp, nil
+	return q, resp, err
 }
 
 // ProcessMetrics represents the GitLab sidekiq process metrics.
@@ -93,7 +93,7 @@ func (s *SidekiqService) GetProcessMetrics(options ...RequestOptionFunc) (*Proce
 		return nil, resp, err
 	}
 
-	return p, resp, nil
+	return p, resp, err
 }
 
 // JobStats represents the GitLab sidekiq job stats.
@@ -124,7 +124,7 @@ func (s *SidekiqService) GetJobStats(options ...RequestOptionFunc) (*JobStats, *
 		return nil, resp, err
 	}
 
-	return j, resp, nil
+	return j, resp, err
 }
 
 // CompoundMetrics represents the GitLab sidekiq compounded stats.
@@ -153,5 +153,5 @@ func (s *SidekiqService) GetCompoundMetrics(options ...RequestOptionFunc) (*Comp
 		return nil, resp, err
 	}
 
-	return c, resp, nil
+	return c, resp, err
 }
diff --git a/snippets.go b/snippets.go
index 12687c3..77ca094 100644
--- a/snippets.go
+++ b/snippets.go
@@ -85,7 +85,7 @@ func (s *SnippetsService) ListSnippets(opt *ListSnippetsOptions, options ...Requ
 		return nil, resp, err
 	}
 
-	return ps, resp, nil
+	return ps, resp, err
 }
 
 // GetSnippet gets a single snippet
@@ -106,7 +106,7 @@ func (s *SnippetsService) GetSnippet(snippet int, options ...RequestOptionFunc)
 		return nil, resp, err
 	}
 
-	return ps, resp, nil
+	return ps, resp, err
 }
 
 // SnippetContent gets a single snippet’s raw contents.
@@ -191,7 +191,7 @@ func (s *SnippetsService) CreateSnippet(opt *CreateSnippetOptions, options ...Re
 		return nil, resp, err
 	}
 
-	return ps, resp, nil
+	return ps, resp, err
 }
 
 // UpdateSnippetFileOptions represents the update snippet file options.
@@ -237,7 +237,7 @@ func (s *SnippetsService) UpdateSnippet(snippet int, opt *UpdateSnippetOptions,
 		return nil, resp, err
 	}
 
-	return ps, resp, nil
+	return ps, resp, err
 }
 
 // DeleteSnippet deletes an existing snippet. This is an idempotent
@@ -279,5 +279,5 @@ func (s *SnippetsService) ExploreSnippets(opt *ExploreSnippetsOptions, options .
 		return nil, resp, err
 	}
 
-	return ps, resp, nil
+	return ps, resp, err
 }
diff --git a/system_hooks.go b/system_hooks.go
index 1f151fa..d11dceb 100644
--- a/system_hooks.go
+++ b/system_hooks.go
@@ -64,7 +64,7 @@ func (s *SystemHooksService) ListHooks(options ...RequestOptionFunc) ([]*Hook, *
 		return nil, resp, err
 	}
 
-	return h, resp, nil
+	return h, resp, err
 }
 
 // GetHook get a single system hook.
@@ -85,7 +85,7 @@ func (s *SystemHooksService) GetHook(hook int, options ...RequestOptionFunc) (*H
 		return nil, resp, err
 	}
 
-	return h, resp, nil
+	return h, resp, err
 }
 
 // AddHookOptions represents the available AddHook() options.
@@ -118,7 +118,7 @@ func (s *SystemHooksService) AddHook(opt *AddHookOptions, options ...RequestOpti
 		return nil, resp, err
 	}
 
-	return h, resp, nil
+	return h, resp, err
 }
 
 // HookEvent represents an event trigger by a GitLab system hook.
@@ -155,7 +155,7 @@ func (s *SystemHooksService) TestHook(hook int, options ...RequestOptionFunc) (*
 		return nil, resp, err
 	}
 
-	return h, resp, nil
+	return h, resp, err
 }
 
 // DeleteHook deletes a system hook. This is an idempotent API function and
diff --git a/tags.go b/tags.go
index 18a710d..cfb58a8 100644
--- a/tags.go
+++ b/tags.go
@@ -88,7 +88,7 @@ func (s *TagsService) ListTags(pid interface{}, opt *ListTagsOptions, options ..
 		return nil, resp, err
 	}
 
-	return t, resp, nil
+	return t, resp, err
 }
 
 // GetTag a specific repository tag determined by its name. It returns 200 together
@@ -114,7 +114,7 @@ func (s *TagsService) GetTag(pid interface{}, tag string, options ...RequestOpti
 		return nil, resp, err
 	}
 
-	return t, resp, nil
+	return t, resp, err
 }
 
 // CreateTagOptions represents the available CreateTag() options.
@@ -152,7 +152,7 @@ func (s *TagsService) CreateTag(pid interface{}, opt *CreateTagOptions, options
 		return nil, resp, err
 	}
 
-	return t, resp, nil
+	return t, resp, err
 }
 
 // DeleteTag deletes a tag of a repository with given name.
@@ -209,7 +209,7 @@ func (s *TagsService) CreateReleaseNote(pid interface{}, tag string, opt *Create
 		return nil, resp, err
 	}
 
-	return r, resp, nil
+	return r, resp, err
 }
 
 // UpdateReleaseNoteOptions represents the available UpdateReleaseNote() options.
@@ -244,5 +244,5 @@ func (s *TagsService) UpdateReleaseNote(pid interface{}, tag string, opt *Update
 		return nil, resp, err
 	}
 
-	return r, resp, nil
+	return r, resp, err
 }
diff --git a/time_stats.go b/time_stats.go
index c1256b9..4cf1b10 100644
--- a/time_stats.go
+++ b/time_stats.go
@@ -72,7 +72,7 @@ func (s *timeStatsService) setTimeEstimate(pid interface{}, entity string, issue
 		return nil, resp, err
 	}
 
-	return t, resp, nil
+	return t, resp, err
 }
 
 // resetTimeEstimate resets the time estimate for a single project issue.
@@ -96,7 +96,7 @@ func (s *timeStatsService) resetTimeEstimate(pid interface{}, entity string, iss
 		return nil, resp, err
 	}
 
-	return t, resp, nil
+	return t, resp, err
 }
 
 // AddSpentTimeOptions represents the available AddSpentTime() options.
@@ -127,7 +127,7 @@ func (s *timeStatsService) addSpentTime(pid interface{}, entity string, issue in
 		return nil, resp, err
 	}
 
-	return t, resp, nil
+	return t, resp, err
 }
 
 // resetSpentTime resets the spent time for a single project issue.
@@ -151,7 +151,7 @@ func (s *timeStatsService) resetSpentTime(pid interface{}, entity string, issue
 		return nil, resp, err
 	}
 
-	return t, resp, nil
+	return t, resp, err
 }
 
 // getTimeSpent gets the spent time for a single project issue.
@@ -175,5 +175,5 @@ func (s *timeStatsService) getTimeSpent(pid interface{}, entity string, issue in
 		return nil, resp, err
 	}
 
-	return t, resp, nil
+	return t, resp, err
 }
diff --git a/todos.go b/todos.go
index 4e3c58d..32d2b0a 100644
--- a/todos.go
+++ b/todos.go
@@ -132,7 +132,7 @@ func (s *TodosService) ListTodos(opt *ListTodosOptions, options ...RequestOption
 		return nil, resp, err
 	}
 
-	return t, resp, nil
+	return t, resp, err
 }
 
 // MarkTodoAsDone marks a single pending todo given by its ID for the current user as done.
diff --git a/topics.go b/topics.go
index 719589f..c9d8e5e 100644
--- a/topics.go
+++ b/topics.go
@@ -73,7 +73,7 @@ func (s *TopicsService) ListTopics(opt *ListTopicsOptions, options ...RequestOpt
 		return nil, resp, err
 	}
 
-	return t, resp, nil
+	return t, resp, err
 }
 
 // GetTopic gets a project topic by ID.
@@ -93,7 +93,7 @@ func (s *TopicsService) GetTopic(topic int, options ...RequestOptionFunc) (*Topi
 		return nil, resp, err
 	}
 
-	return t, resp, nil
+	return t, resp, err
 }
 
 // CreateTopicOptions represents the available CreateTopic() options.
@@ -153,7 +153,7 @@ func (s *TopicsService) CreateTopic(opt *CreateTopicOptions, options ...RequestO
 		return nil, resp, err
 	}
 
-	return t, resp, nil
+	return t, resp, err
 }
 
 // UpdateTopicOptions represents the available UpdateTopic() options.
@@ -203,7 +203,7 @@ func (s *TopicsService) UpdateTopic(topic int, opt *UpdateTopicOptions, options
 		return nil, resp, err
 	}
 
-	return t, resp, nil
+	return t, resp, err
 }
 
 // DeleteTopic deletes a project topic. Only available to administrators.
diff --git a/users.go b/users.go
index 68ddd6b..c189e35 100644
--- a/users.go
+++ b/users.go
@@ -153,7 +153,7 @@ func (s *UsersService) ListUsers(opt *ListUsersOptions, options ...RequestOption
 		return nil, resp, err
 	}
 
-	return usr, resp, nil
+	return usr, resp, err
 }
 
 // GetUsersOptions represents the available GetUser() options.
@@ -180,7 +180,7 @@ func (s *UsersService) GetUser(user int, opt GetUsersOptions, options ...Request
 		return nil, resp, err
 	}
 
-	return usr, resp, nil
+	return usr, resp, err
 }
 
 // CreateUserOptions represents the available CreateUser() options.
@@ -228,7 +228,7 @@ func (s *UsersService) CreateUser(opt *CreateUserOptions, options ...RequestOpti
 		return nil, resp, err
 	}
 
-	return usr, resp, nil
+	return usr, resp, err
 }
 
 // ModifyUserOptions represents the available ModifyUser() options.
@@ -279,7 +279,7 @@ func (s *UsersService) ModifyUser(user int, opt *ModifyUserOptions, options ...R
 		return nil, resp, err
 	}
 
-	return usr, resp, nil
+	return usr, resp, err
 }
 
 // DeleteUser deletes a user. Available only for administrators. This is an
@@ -315,7 +315,7 @@ func (s *UsersService) CurrentUser(options ...RequestOptionFunc) (*User, *Respon
 		return nil, resp, err
 	}
 
-	return usr, resp, nil
+	return usr, resp, err
 }
 
 // UserStatus represents the current status of a user
@@ -345,7 +345,7 @@ func (s *UsersService) CurrentUserStatus(options ...RequestOptionFunc) (*UserSta
 		return nil, resp, err
 	}
 
-	return status, resp, nil
+	return status, resp, err
 }
 
 // GetUserStatus retrieves a user's status
@@ -366,7 +366,7 @@ func (s *UsersService) GetUserStatus(user int, options ...RequestOptionFunc) (*U
 		return nil, resp, err
 	}
 
-	return status, resp, nil
+	return status, resp, err
 }
 
 // UserStatusOptions represents the options required to set the status
@@ -395,7 +395,7 @@ func (s *UsersService) SetUserStatus(opt *UserStatusOptions, options ...RequestO
 		return nil, resp, err
 	}
 
-	return status, resp, nil
+	return status, resp, err
 }
 
 // SSHKey represents a SSH key.
@@ -424,7 +424,7 @@ func (s *UsersService) ListSSHKeys(options ...RequestOptionFunc) ([]*SSHKey, *Re
 		return nil, resp, err
 	}
 
-	return k, resp, nil
+	return k, resp, err
 }
 
 // ListSSHKeysForUserOptions represents the available ListSSHKeysForUser() options.
@@ -455,7 +455,7 @@ func (s *UsersService) ListSSHKeysForUser(uid interface{}, opt *ListSSHKeysForUs
 		return nil, resp, err
 	}
 
-	return k, resp, nil
+	return k, resp, err
 }
 
 // GetSSHKey gets a single key.
@@ -475,7 +475,7 @@ func (s *UsersService) GetSSHKey(key int, options ...RequestOptionFunc) (*SSHKey
 		return nil, resp, err
 	}
 
-	return k, resp, nil
+	return k, resp, err
 }
 
 // GetSSHKeyForUser gets a single key for a given user.
@@ -495,7 +495,7 @@ func (s *UsersService) GetSSHKeyForUser(user int, key int, options ...RequestOpt
 		return nil, resp, err
 	}
 
-	return k, resp, nil
+	return k, resp, err
 }
 
 // AddSSHKeyOptions represents the available AddSSHKey() options.
@@ -522,7 +522,7 @@ func (s *UsersService) AddSSHKey(opt *AddSSHKeyOptions, options ...RequestOption
 		return nil, resp, err
 	}
 
-	return k, resp, nil
+	return k, resp, err
 }
 
 // AddSSHKeyForUser creates new key owned by specified user. Available only for
@@ -543,7 +543,7 @@ func (s *UsersService) AddSSHKeyForUser(user int, opt *AddSSHKeyOptions, options
 		return nil, resp, err
 	}
 
-	return k, resp, nil
+	return k, resp, err
 }
 
 // DeleteSSHKey deletes key owned by currently authenticated user. This is an
@@ -603,7 +603,7 @@ func (s *UsersService) ListGPGKeys(options ...RequestOptionFunc) ([]*GPGKey, *Re
 		return nil, resp, err
 	}
 
-	return ks, resp, nil
+	return ks, resp, err
 }
 
 // GetGPGKey gets a specific GPG key of currently authenticated user.
@@ -623,7 +623,7 @@ func (s *UsersService) GetGPGKey(key int, options ...RequestOptionFunc) (*GPGKey
 		return nil, resp, err
 	}
 
-	return k, resp, nil
+	return k, resp, err
 }
 
 // AddGPGKeyOptions represents the available AddGPGKey() options.
@@ -648,7 +648,7 @@ func (s *UsersService) AddGPGKey(opt *AddGPGKeyOptions, options ...RequestOption
 		return nil, resp, err
 	}
 
-	return k, resp, nil
+	return k, resp, err
 }
 
 // DeleteGPGKey deletes a GPG key owned by currently authenticated user.
@@ -683,7 +683,7 @@ func (s *UsersService) ListGPGKeysForUser(user int, options ...RequestOptionFunc
 		return nil, resp, err
 	}
 
-	return ks, resp, nil
+	return ks, resp, err
 }
 
 // GetGPGKeyForUser gets a specific GPG key for a given user.
@@ -703,7 +703,7 @@ func (s *UsersService) GetGPGKeyForUser(user, key int, options ...RequestOptionF
 		return nil, resp, err
 	}
 
-	return k, resp, nil
+	return k, resp, err
 }
 
 // AddGPGKeyForUser creates new GPG key owned by the specified user.
@@ -724,7 +724,7 @@ func (s *UsersService) AddGPGKeyForUser(user int, opt *AddGPGKeyOptions, options
 		return nil, resp, err
 	}
 
-	return k, resp, nil
+	return k, resp, err
 }
 
 // DeleteGPGKeyForUser deletes a GPG key owned by a specified user.
@@ -766,7 +766,7 @@ func (s *UsersService) ListEmails(options ...RequestOptionFunc) ([]*Email, *Resp
 		return nil, resp, err
 	}
 
-	return e, resp, nil
+	return e, resp, err
 }
 
 // ListEmailsForUserOptions represents the available ListEmailsForUser() options.
@@ -794,7 +794,7 @@ func (s *UsersService) ListEmailsForUser(user int, opt *ListEmailsForUserOptions
 		return nil, resp, err
 	}
 
-	return e, resp, nil
+	return e, resp, err
 }
 
 // GetEmail gets a single email.
@@ -814,7 +814,7 @@ func (s *UsersService) GetEmail(email int, options ...RequestOptionFunc) (*Email
 		return nil, resp, err
 	}
 
-	return e, resp, nil
+	return e, resp, err
 }
 
 // AddEmailOptions represents the available AddEmail() options.
@@ -840,7 +840,7 @@ func (s *UsersService) AddEmail(opt *AddEmailOptions, options ...RequestOptionFu
 		return nil, resp, err
 	}
 
-	return e, resp, nil
+	return e, resp, err
 }
 
 // AddEmailForUser creates new email owned by specified user. Available only for
@@ -861,7 +861,7 @@ func (s *UsersService) AddEmailForUser(user int, opt *AddEmailOptions, options .
 		return nil, resp, err
 	}
 
-	return e, resp, nil
+	return e, resp, err
 }
 
 // DeleteEmail deletes email owned by currently authenticated user. This is an
@@ -1162,7 +1162,7 @@ func (s *UsersService) GetAllImpersonationTokens(user int, opt *GetAllImpersonat
 		return nil, resp, err
 	}
 
-	return ts, resp, nil
+	return ts, resp, err
 }
 
 // GetImpersonationToken retrieves an impersonation token of a user.
@@ -1183,7 +1183,7 @@ func (s *UsersService) GetImpersonationToken(user, token int, options ...Request
 		return nil, resp, err
 	}
 
-	return t, resp, nil
+	return t, resp, err
 }
 
 // CreateImpersonationTokenOptions represents the available
@@ -1215,7 +1215,7 @@ func (s *UsersService) CreateImpersonationToken(user int, opt *CreateImpersonati
 		return nil, resp, err
 	}
 
-	return t, resp, nil
+	return t, resp, err
 }
 
 // RevokeImpersonationToken revokes an impersonation token.
@@ -1262,7 +1262,7 @@ func (s *UsersService) CreatePersonalAccessToken(user int, opt *CreatePersonalAc
 		return nil, resp, err
 	}
 
-	return t, resp, nil
+	return t, resp, err
 }
 
 // UserActivity represents an entry in the user/activities response
@@ -1299,7 +1299,7 @@ func (s *UsersService) GetUserActivities(opt *GetUserActivitiesOptions, options
 		return nil, resp, err
 	}
 
-	return t, resp, nil
+	return t, resp, err
 }
 
 // UserMembership represents a membership of the user in a namespace or project.
@@ -1340,7 +1340,7 @@ func (s *UsersService) GetUserMemberships(user int, opt *GetUserMembershipOption
 		return nil, resp, err
 	}
 
-	return m, resp, nil
+	return m, resp, err
 }
 
 // DisableTwoFactor disables two factor authentication for the specified user.
diff --git a/version.go b/version.go
index 0d30b90..e7331d5 100644
--- a/version.go
+++ b/version.go
@@ -54,5 +54,5 @@ func (s *VersionService) GetVersion(options ...RequestOptionFunc) (*Version, *Re
 		return nil, resp, err
 	}
 
-	return v, resp, nil
+	return v, resp, err
 }
diff --git a/wikis.go b/wikis.go
index 39847ef..73de1af 100644
--- a/wikis.go
+++ b/wikis.go
@@ -75,7 +75,7 @@ func (s *WikisService) ListWikis(pid interface{}, opt *ListWikisOptions, options
 		return nil, resp, err
 	}
 
-	return ws, resp, nil
+	return ws, resp, err
 }
 
 // GetWikiPageOptions represents options to GetWikiPage
@@ -109,7 +109,7 @@ func (s *WikisService) GetWikiPage(pid interface{}, slug string, opt *GetWikiPag
 		return nil, resp, err
 	}
 
-	return w, resp, nil
+	return w, resp, err
 }
 
 // CreateWikiPageOptions represents options to CreateWikiPage.
@@ -145,7 +145,7 @@ func (s *WikisService) CreateWikiPage(pid interface{}, opt *CreateWikiPageOption
 		return nil, resp, err
 	}
 
-	return w, resp, nil
+	return w, resp, err
 }
 
 // EditWikiPageOptions represents options to EditWikiPage.
@@ -181,7 +181,7 @@ func (s *WikisService) EditWikiPage(pid interface{}, slug string, opt *EditWikiP
 		return nil, resp, err
 	}
 
-	return w, resp, nil
+	return w, resp, err
 }
 
 // DeleteWikiPage deletes a wiki page with a given slug.


Test patch:
diff --git a/environments_test.go b/environments_test.go
index ec833a1..0bab92b 100644
--- a/environments_test.go
+++ b/environments_test.go
@@ -164,8 +164,9 @@ func TestStopEnvironment(t *testing.T) {
 	mux.HandleFunc("/api/v4/projects/1/environments/1/stop", func(w http.ResponseWriter, r *http.Request) {
 		testMethod(t, r, http.MethodPost)
 		testURL(t, r, "/api/v4/projects/1/environments/1/stop")
+		fmt.Fprint(w, `{"id": 1,"name": "staging", "state": "stopping", "slug": "staging", "external_url": "https://staging.example.gitlab.com", "tier": "staging"}`)
 	})
-	_, err := client.Environments.StopEnvironment(1, 1)
+	_, _, err := client.Environments.StopEnvironment(1, 1)
 	if err != nil {
 		log.Fatal(err)
 	}
diff --git a/event_webhook_types_test.go b/event_webhook_types_test.go
index 69ae200..bcd005e 100644
--- a/event_webhook_types_test.go
+++ b/event_webhook_types_test.go
@@ -932,11 +932,7 @@ func TestPipelineEventUnmarshal(t *testing.T) {
 	}
 
 	if event.ObjectAttributes.ID != 31 {
-		t.Errorf("ObjectAttributes.ID is %v, want %v", event.ObjectAttributes.ID, 31)
-	}
-
-	if event.ObjectAttributes.IID != 123 {
-		t.Errorf("ObjectAttributes.IID is %v, want %v", event.ObjectAttributes.ID, 123)
+		t.Errorf("ObjectAttributes.ID is %v, want %v", event.ObjectAttributes.ID, 1977)
 	}
 
 	if event.ObjectAttributes.DetailedStatus != "passed" {
diff --git a/testdata/webhooks/pipeline.json b/testdata/webhooks/pipeline.json
index 27d0e93..50df632 100644
--- a/testdata/webhooks/pipeline.json
+++ b/testdata/webhooks/pipeline.json
@@ -2,7 +2,6 @@
   "object_kind": "pipeline",
   "object_attributes": {
     "id": 31,
-    "iid": 123,
     "ref": "master",
     "tag": false,
     "sha": "bcbb5ec396a2c0f828686f14fac9b80b780504f2",