Skip to content

updateIssueNote throws an GitLabApiException with the status text "OK" (status code check does not match) #221

@RAYs3T

Description

@RAYs3T

Problem

GitLab returns status code 200. But the result is matched against 201.

api.getNotesApi().updateIssueNote(projectId, issueId, existingNoteId, "(updated): " + comment);

org.gitlab4j.api.GitLabApiException: OK at org.gitlab4j.api.AbstractApi.validate(AbstractApi.java:433) ~[gitlab4j-api-4.8.25.jar:?] at org.gitlab4j.api.AbstractApi.put(AbstractApi.java:303) ~[gitlab4j-api-4.8.25.jar:?] at org.gitlab4j.api.NotesApi.updateIssueNote(NotesApi.java:179) ~[gitlab4j-api-4.8.25.jar:?]

Possible fix:

Change the expected status code in NotesApi.java:179 from 201 to 200 (Response.Status.OK)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions