Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: reject with real errors for GitLab API calls for better debugging #1465

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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