Skip to content

Conversation

GautamParmar22
Copy link

I faced an issue where LogAPIResponseToLog() threw "Content-Type on null" and
null comparison errors because it assumed the Content-Type header was
always present.

This fix adds an isset() check before accessing the Content-Type key,
so XML parsing is only attempted when the header exists.

With this change, API response logging no longer breaks when the
Content-Type header is missing or has unexpected values, making it
safer and more reliable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant