Skip to content

Null reference exception thrown by request error #138

@jackalvrus

Description

@jackalvrus

If the HTTP request to the API fails, a NullReferenceException is thrown by CyberSource.Client.ApiClient.CallApiAsync.

The easiest way to reproduce this is to use a non-existent URL. However, we have experienced this in production due to connectivity issues.

This is caused by the code attempting to enumerate the response headers collection without checking for the headers collection being null.

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