Skip to content

Commit

Permalink
Merge pull request #1465 from frantic1048/fix/reject-with-real-gitlab…
Browse files Browse the repository at this point in the history
…-api-errors

fix: reject with real errors for GitLab API calls for better debugging
  • Loading branch information
orta authored Sep 24, 2024
2 parents b67d710 + b62df49 commit 491bb0b
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions source/platforms/gitlab/GitLabAPI.ts
Original file line number Diff line number Diff line change
Expand Up @@ -184,9 +184,8 @@ class GitLabAPI {
return note as Types.MergeRequestNoteSchema
} catch (e) {
this.d("createMergeRequestNote", e)
throw e
}

return Promise.reject()
}

updateMergeRequestDiscussionNote = async (
Expand All @@ -207,9 +206,8 @@ class GitLabAPI {
return discussionNote as Types.MergeRequestDiscussionNoteSchema
} catch (e) {
this.d("updateMergeRequestDiscussionNote", e)
throw e
}

return Promise.reject()
}

updateMergeRequestNote = async (id: number, body: string): Promise<Types.MergeRequestNoteSchema> => {
Expand All @@ -220,9 +218,8 @@ class GitLabAPI {
return note as Types.MergeRequestNoteSchema
} catch (e) {
this.d("updateMergeRequestNote", e)
throw e
}

return Promise.reject()
}

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

0 comments on commit 491bb0b

Please sign in to comment.