Skip to content

Commit

Permalink
LIMS-1125: Pass shipping error status back from backend
Browse files Browse the repository at this point in the history
  • Loading branch information
MattPrit committed Nov 22, 2023
1 parent ff3e520 commit f01bd29
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 f01bd29

Please sign in to comment.