Skip to content

Commit 491bb0b

Browse files
authored
Merge pull request #1465 from frantic1048/fix/reject-with-real-gitlab-api-errors
fix: reject with real errors for GitLab API calls for better debugging
2 parents b67d710 + b62df49 commit 491bb0b

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

source/platforms/gitlab/GitLabAPI.ts

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -184,9 +184,8 @@ class GitLabAPI {
184184
return note as Types.MergeRequestNoteSchema
185185
} catch (e) {
186186
this.d("createMergeRequestNote", e)
187+
throw e
187188
}
188-
189-
return Promise.reject()
190189
}
191190

192191
updateMergeRequestDiscussionNote = async (
@@ -207,9 +206,8 @@ class GitLabAPI {
207206
return discussionNote as Types.MergeRequestDiscussionNoteSchema
208207
} catch (e) {
209208
this.d("updateMergeRequestDiscussionNote", e)
209+
throw e
210210
}
211-
212-
return Promise.reject()
213211
}
214212

215213
updateMergeRequestNote = async (id: number, body: string): Promise<Types.MergeRequestNoteSchema> => {
@@ -220,9 +218,8 @@ class GitLabAPI {
220218
return note as Types.MergeRequestNoteSchema
221219
} catch (e) {
222220
this.d("updateMergeRequestNote", e)
221+
throw e
223222
}
224-
225-
return Promise.reject()
226223
}
227224

228225
// note: deleting the _only_ discussion note in a discussion also deletes the discussion \o/

0 commit comments

Comments
 (0)