Amazon-SP-API-CSharp icon indicating copy to clipboard operation
Amazon-SP-API-CSharp copied to clipboard

GetRates failure returns vague message

Open marketlabdev opened this issue 2 years ago • 2 comments

When making a call to ShippingV2.GetRatesAsync, I get back a generic "Invalid Input" message, which is not helpful. After running the Amazon-SP-API-CSharp code instead of the nuget package I was able to track down the problem.

In Services.RequestService.ParseResponse, line 270 the error.Message is always the dull "Invalid Input", but the error.Details actually contains the text I need to see.

In my case it was "The requested item weights are greater than the requested package weight.", which was immensely more helpful than just "Invalid Input". Would you please change the code to throw the error with the Details instead of the Message?

marketlabdev avatar Mar 29 '23 19:03 marketlabdev

You are catching a Exception, try to catch AmazonException instead, it should contains a property called "Response" with the complete response content from the API.

RegaloOriginal avatar Jun 29 '23 06:06 RegaloOriginal

Personally I have no time to keep updating this package but I'm open any developer need to fix or add feature on it its take many times from me to get it live , and I need other developer help to add the fix for new features by submit new Pull requests , I will try to review and accept within 2 days .

Please try fork our rep and then submit your change to review and merge with our code

abuzuhri avatar Jul 03 '23 20:07 abuzuhri