Small logging improvement
This commit is contained in:
@@ -290,8 +290,10 @@ class FreeRoomsAction(AlpineBitsAction):
|
|||||||
# Validate standard inventory entries
|
# Validate standard inventory entries
|
||||||
inv_type_code = (sac.inv_type_code or "").strip()
|
inv_type_code = (sac.inv_type_code or "").strip()
|
||||||
if not inv_type_code:
|
if not inv_type_code:
|
||||||
|
error_message = "InvTypeCode is required unless AllInvCode=\"true\" or similar truthy values"
|
||||||
|
_LOGGER.info(error_message)
|
||||||
raise FreeRoomsProcessingError(
|
raise FreeRoomsProcessingError(
|
||||||
"InvTypeCode is required unless AllInvCode=\"true\"",
|
error_message,
|
||||||
HttpStatusCode.BAD_REQUEST,
|
HttpStatusCode.BAD_REQUEST,
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -301,8 +303,10 @@ class FreeRoomsAction(AlpineBitsAction):
|
|||||||
# Check for overlap with closing seasons
|
# Check for overlap with closing seasons
|
||||||
for closing_start, closing_end in closing_season_ranges:
|
for closing_start, closing_end in closing_season_ranges:
|
||||||
if self._date_ranges_overlap(start_date, end_date, closing_start, closing_end):
|
if self._date_ranges_overlap(start_date, end_date, closing_start, closing_end):
|
||||||
|
error_message = f"Inventory entry ({start_date} to {end_date}) overlaps with closing season ({closing_start} to {closing_end})"
|
||||||
|
_LOGGER.info(error_message)
|
||||||
raise FreeRoomsProcessingError(
|
raise FreeRoomsProcessingError(
|
||||||
f"Inventory entry ({start_date} to {end_date}) overlaps with closing season ({closing_start} to {closing_end})",
|
error_message,
|
||||||
HttpStatusCode.BAD_REQUEST,
|
HttpStatusCode.BAD_REQUEST,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user