Skip to content

Commit

Permalink
Merge pull request #694 from DiamondLightSource/fix/lims-1125/login-r…
Browse files Browse the repository at this point in the history
…edirect-on-shipping-auth-failure

LIMS-1125: Prompt user login on shipping service 401 status
  • Loading branch information
NKatti2011 authored Nov 23, 2023
2 parents ac5f9d8 + f01bd29 commit d1535b8
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion api/src/Page/Shipment.php
Original file line number Diff line number Diff line change
Expand Up @@ -2895,7 +2895,12 @@ function _create_awb()

$ship['DELIVERYAGENT_FLIGHTCODE'] = $awb['awb'];
} catch (\Exception $e) {
$this->_error($e->getMessage());
if (Utils::getValueOrDefault($use_shipping_service_incoming_shipments) && $accno === $dhl_acc){
$error_response = json_decode($e->getMessage());
$this->_error($error_response->content->detail, $error_response->status);
} else {
$this->_error($e->getMessage());
}
}
}
$pickup = null;
Expand Down

0 comments on commit d1535b8

Please sign in to comment.