fix: map warehouse pallet lookup failure
This commit is contained in:
+6
-1
@@ -256,7 +256,12 @@ public class ReceivingContainerService {
|
||||
ReceivingContainerSession session = requireSigned(operatorKey);
|
||||
String customerId = session.getCustomerId();
|
||||
InboundRef ref = requireInbound(customerId, session.getContainerNo(), request.inboundCode());
|
||||
WarehouseResourceGateway.WarehousePalletReference pallet = warehouse.resolvePallet(request.palletCode());
|
||||
WarehouseResourceGateway.WarehousePalletReference pallet;
|
||||
try {
|
||||
pallet = warehouse.resolvePallet(request.palletCode());
|
||||
} catch (IllegalArgumentException exception) {
|
||||
throw notFound("Pallet was not found");
|
||||
}
|
||||
if (pallet == null) throw notFound("Pallet was not found");
|
||||
validatePallet(ref, pallet);
|
||||
return new ReceivingContainerResponses.PalletResolved(pallet.palletNo(), pallet.warehouseId(), pallet.status(),
|
||||
|
||||
Reference in New Issue
Block a user