Skip to content

bug: nullpointerexception when response code is not 200ok #44

@fioncat

Description

@fioncat

Bug position: DefaultTransport.java#L82.

When response code is not 200ok, the httpResponse.getLastHeader(HEADER_REQUEST_ID) will be null, which cause nullpointerexception here.

We need to change the code here to:

String requestId;
if (httpResponse.getLastHeader(HEADER_REQUEST_ID) != null) {
    requestId = httpResponse.getLastHeader(HEADER_REQUEST_ID).getValue();
}

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions