Skip to content

Commit 5ba647e

Browse files
committed
remove now unused out-of-stock exception [chapter_07_events_and_message_bus_ends]
1 parent a0087b3 commit 5ba647e

File tree

2 files changed

+1
-4
lines changed

2 files changed

+1
-4
lines changed

src/allocation/exceptions.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
class OutOfStock(Exception):
2-
pass
3-
41
class InvalidSku(Exception):
52
pass
63

src/allocation/flask_app.py

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

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

0 commit comments

Comments
 (0)