Skip to content

Commit a6bc598

Browse files
committed
remove now unused out-of-stock exception [chapter_07_events_and_message_bus_ends]
1 parent ff9d67f commit a6bc598

2 files changed

Lines changed: 1 addition & 5 deletions

File tree

src/allocation/domain/model.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,6 @@
55
from . import events
66

77

8-
class OutOfStock(Exception):
9-
pass
10-
11-
128
class Product:
139

1410
def __init__(self, sku: str, batches: List[Batch], version_number: int = 0):

src/allocation/entrypoints/flask_app.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ def allocate_endpoint():
3030
request.json['qty'],
3131
unit_of_work.SqlAlchemyUnitOfWork(),
3232
)
33-
except (model.OutOfStock, services.InvalidSku) as e:
33+
except services.InvalidSku as e:
3434
return jsonify({'message': str(e)}), 400
3535

3636
return jsonify({'batchref': batchref}), 201

0 commit comments

Comments
 (0)