Skip to content

Commit 9f5d496

Browse files
committed
raise error when checkout url can't be created
1 parent 43bb583 commit 9f5d496

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

backend/btrixcloud/subs.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -296,10 +296,7 @@ async def list_sub_events(
296296
page: int = 1,
297297
sort_by: Optional[str] = None,
298298
sort_direction: Optional[int] = -1,
299-
) -> Tuple[
300-
List[SubscriptionEventAnyOut],
301-
int,
302-
]:
299+
) -> Tuple[List[SubscriptionEventAnyOut], int,]:
303300
"""list subscription events"""
304301
# pylint: disable=duplicate-code, too-many-locals, too-many-branches, too-many-statements
305302
# Zero-index page for query
@@ -463,6 +460,9 @@ async def get_checkout_url(
463460
# pylint: disable=broad-exception-caught
464461
except Exception as exc:
465462
print("Error fetching checkout url", exc)
463+
raise HTTPException(
464+
status_code=500, detail="Error fetching checkout url"
465+
) from exc
466466

467467

468468
# pylint: disable=invalid-name,too-many-arguments,too-many-locals

0 commit comments

Comments
 (0)