Shopify / active_shipping

ActiveShipping is a simple shipping abstraction library extracted from Shopify
http://shopify.github.io/active_shipping
MIT License
812 stars 546 forks source link

UPS tracking details doesn't handle brand new packages? #112

Open mperham opened 11 years ago

mperham commented 11 years ago

We have a shipment where UPS is returning this:

<?xml version="1.0"?>
<TrackResponse><Response><ResponseStatusCode>1</ResponseStatusCode><ResponseStatusDescription>Success</ResponseStatusDescription></Response><Shipment><Shipper/><ShipmentWeight><UnitOfMeasurement><Code>LBS</Code></UnitOfMeasurement><Weight>0.00</Weight></ShipmentWeight><Service><Code>03</Code><Description>UPS GROUND</Description></Service><ShipmentIdentificationNumber>1ZR08E820311157913</ShipmentIdentificationNumber><Package><TrackingNumber>1ZR08E820311157913</TrackingNumber><PackageWeight><UnitOfMeasurement><Code>LBS</Code></UnitOfMeasurement><Weight>0.00</Weight></PackageWeight></Package></Shipment></TrackResponse>

I suspect this is a brand new shipment where UPS doesn't have any detail in its database yet. It causes a undefined method 'get_text' for nil:NilClass error here:

https://github.com/Shopify/active_shipping/blob/master/lib/active_shipping/shipping/carriers/ups.rb#L341

arthurnn commented 11 years ago

Thanks for the report, I will take a look into this issue.

csaunders commented 10 years ago

@arthurnn did you get anywhere with this?

arthurnn commented 10 years ago

Not actually…

Arthur N.

On Thursday, January 2, 2014 at 3:38 PM, Christopher Saunders wrote:

@arthurnn (https://github.com/arthurnn) did you get anywhere with this?

— Reply to this email directly or view it on GitHub (https://github.com/Shopify/active_shipping/issues/112#issuecomment-31482538).