From 72bee4d3e14a7e0850ee39b71fa3d21daf2495c4 Mon Sep 17 00:00:00 2001 From: BryantHe Date: Mon, 14 Aug 2023 15:58:48 +0800 Subject: [PATCH] fix: update body record api --- app/api/v1/record.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/api/v1/record.py b/app/api/v1/record.py index cd7675f..b14f00f 100644 --- a/app/api/v1/record.py +++ b/app/api/v1/record.py @@ -34,7 +34,7 @@ def get_record(record_id): try: result = rpc.body_record.get_one(record_id) except Exception as e: - raise BodyRecordNotFound() + raise BodyRecordNotFound(extra_data={'error_docs': str(e)}) return result @@ -48,5 +48,5 @@ def get_records(query_data): sort = query_data.get('sort', '-create_time') results = rpc.body_record.get_all_by_user(session['user_id'], sort) except Exception as e: - raise BodyRecordNotFound() + raise BodyRecordNotFound(extra_data={'error_docs': str(e)}) return {'records': results}