Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

Anyone else get frequent FedEx API “Bad Request” errors? 
 
colinmollenhour
Member
 
Avatar
Total Posts:  50
Joined:  2009-05-01
 

On a site with > 60k page views per day (~4k on /checkout/cart) I’m getting about 20 errors per day from the FedEx SOAP requests for package rates. The error is:

SoapFault exception[HTTP] Bad Request in ...

We’re using a customized version of the FedEx carrier driver which:
- calculates multi-package weights more accurately (still uses only one request)
- sets a shorter connection timeout (5 seconds) to prevent slow page loads
- sets a shorter response timeout (10 seconds) to prevent slow page loads
- fixes caching by removing the ShipTimestamp from the cache key data and caches requests in the global cache (instead of just a PHP array).

I don’t know if these changes have increased or decreased the frequency of errors as I cannot reproduce them in development.

Does anyone else get these errors? If so, how often and have you found a way to reduce their frequency?

Thanks!
Colin

 
Magento Community Magento Community
Magento Community
Magento Community
 
j0ney3
Jr. Member
 
Total Posts:  25
Joined:  2010-02-24
 

Yes sir!  This actually just started to occur when I upgraded to 1.7 and I’m remembering now that I had to hack 1.6 to get it to work.  Here’s a sample of a “bad” request.  I can see that this thread is kinda old and I bet that you already figured out what’s going on in your case.  Btw, I’m a user of both Cm_RedisSession and Cm_Cache_Backend_File...absolutely kickass work on both, thanks!

2013-03-11T17:45:16+00:00 DEBUG (7): Array
(
    
[request] => Array
        (
            
[WebAuthenticationDetail] => Array
                (
                    
[UserCredential] => Array
                        (
                            
[Key] =>*********************
                            
[Password] =>*********************
                        )

                )

            
[ClientDetail] => Array
                (
                    
[AccountNumber] => ****
                    
[MeterNumber] => ****
                )

            
[Version] => Array
                (
                    
[ServiceId] => crs
                    [Major] 
=> 10
                    [Intermediate] 
=> 0
                    [Minor] 
=> 0
                
)

            
[RequestedShipment] => Array
                (
                    
[DropoffType] => REGULAR_PICKUP
                    [ShipTimestamp] 
=> 2013-03-11T17:45:16+00:00
                    [PackagingType] 
=> YOUR_PACKAGING
                    [TotalInsuredValue] 
=> Array
                        (
                            
[Amount] => 1320
                            [Currency] 
=> USD
                        
)

                    
[Shipper] => Array
                        (
                            
[Address] => Array
                                (
                                    
[PostalCode] => 33414
                                    [CountryCode] 
=> US
                                
)

                        )

                    
[Recipient] => Array
                        (
                            
[Address] => Array
                                (
                                    
[PostalCode] => 94402
                                    [CountryCode] 
=> US
                                    [Residential] 
=> 1
                                
)

                        )

                    
[ShippingChargesPayment] => Array
                       (
                            
[PaymentType] => SENDER
                            [Payor] 
=> Array
                                (
                                    
[AccountNumber] => ************
                                    
[CountryCode] => US
                                
)

                        )

                    
[CustomsClearanceDetail] => Array
                        (
                            
[CustomsValue] => Array
                                (
                                    
[Amount] => 1320
                                    [Currency] 
=> USD
                                
)

                        )

                    
[RateRequestTypes] => LIST
                    
[PackageCount] => 1
                    [PackageDetail] 
=> INDIVIDUAL_PACKAGES
                    [RequestedPackageLineItems] 
=> Array
                        (
                            
[0] => Array
                                (
                                    
[Weight] => Array
                                        (
                                            
[Value] => 50
                                            [Units] 
=> LB
                                        
)

                                    
[GroupPackageCount] => 1
                                    [InsuredValue] 
=> Array
                                        (
                                            
[Amount] => 1320
                                            [Currency] 
=> USD
                                        
)

                                )

                        )

                )

        )

    
[result] => Array
        (
            
[error] => Bad Request
            [code] 
=> 0
        
)

    
[__pid] => 20801
)
 
Magento Community Magento Community
Magento Community
Magento Community
 
j0ney3
Jr. Member
 
Total Posts:  25
Joined:  2010-02-24
 

Ok, so further investigation on this issue revealed that these requests are NOT being sent out to Fedex, they’re just failing internally and leaving the customer with the dreaded “Please select a shipping method” while presenting them with NO CHOICES…

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top