Skip to content

[ZSvirt] doc: sdk: comment says 505 but code checks 503 #48

Description

@chayu163

Description

In org.zstack.sdk.ZSClient.asyncPollResult, the comment above the response
handling reads:

// 200 means the task has been completed successfully,
// or a 505 indicates a failure,
// otherwise a 202 returned means it is still
// in processing
if (response.code() == 200 || response.code() == 503) {

The code actually checks for status code 503 (as does the code a few lines
above in the guard, response.code() != 200 && response.code() != 503 && response.code() != 202),
but the comment mentions 505. The comment and the implementation disagree.

Expected behavior

The comment should match the implemented status code.

Proposed fix

// or a 503 indicates a failure,

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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