File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -152,7 +152,7 @@ export const markReportAsRead = async (reportId: string): Promise<MedicalReport>
152152 return response . data ;
153153 } catch ( error ) {
154154 if ( axios . isAxiosError ( error ) ) {
155- throw new ReportError ( `Failed to mark report as read: ${ error . message } ` ) ;
155+ throw new ReportError ( `Failed to mark report as read: ${ error . message || 'Unknown error' } ` ) ;
156156 }
157157 throw new ReportError ( 'Failed to mark report as read' ) ;
158158 }
@@ -180,7 +180,9 @@ export const toggleReportBookmark = async (
180180 return response . data ;
181181 } catch ( error ) {
182182 if ( axios . isAxiosError ( error ) ) {
183- throw new ReportError ( `Failed to toggle bookmark status: ${ error . message } ` ) ;
183+ throw new ReportError (
184+ `Failed to toggle bookmark status: ${ error . message || 'Unknown error' } ` ,
185+ ) ;
184186 }
185187 throw new ReportError ( 'Failed to toggle bookmark status' ) ;
186188 }
You can’t perform that action at this time.
0 commit comments