- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Error on Report Download API
I found error on CyberSource.Api.ReportDownloadAPI- DownloadReportAsyncWithHttpInfo. I'm using package CyberSource.Rest.Client.NetStandard. Whenever I call that method with all required and valid configurations, i got error "An item with the same key has already been added. Key: Vary''. After debugging sometime i came to know that error is on this line=
return new ApiResponse<object>(statusCode, restResponse.Headers.ToDictionary((HeaderParameter x) => x.Name, (HeaderParameter x) => x.Value.ToString()), restResponse.Content);.
On this restResponse.Headers there're 2 vary key which is causing error.
Thank you.
Pramesh KC
โ07-15-2024 06:38 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The error arises because rest Response. Headers contains duplicate Vary keys. You can handle this by modifying the code to handle duplicate keys, or by filtering the headers to ensure each key is unique before creating the ApiResponse object.
โ07-20-2024 12:16 AM

