@@ -59,7 +59,11 @@ export default {
5959				return  new  Share ( request . data . ocs . data ) 
6060			}  catch  ( error )  { 
6161				console . error ( 'Error while creating share' ,  error ) 
62- 				OC . Notification . showTemporary ( t ( 'files_sharing' ,  'Error creating the share' ) ,  {  type : 'error'  } ) 
62+ 				const  errorMessage  =  error ?. response ?. data ?. ocs ?. meta ?. message 
63+ 				OC . Notification . showTemporary ( 
64+ 					errorMessage  ? t ( 'files_sharing' ,  'Error creating the share: {errorMessage}' ,  {  errorMessage } )  : t ( 'files_sharing' ,  'Error creating the share' ) , 
65+ 					{  type : 'error'  } 
66+ 				) 
6367				throw  error 
6468			} 
6569		} , 
@@ -79,7 +83,11 @@ export default {
7983				return  true 
8084			}  catch  ( error )  { 
8185				console . error ( 'Error while deleting share' ,  error ) 
82- 				OC . Notification . showTemporary ( t ( 'files_sharing' ,  'Error deleting the share' ) ,  {  type : 'error'  } ) 
86+ 				const  errorMessage  =  error ?. response ?. data ?. ocs ?. meta ?. message 
87+ 				OC . Notification . showTemporary ( 
88+ 					errorMessage  ? t ( 'files_sharing' ,  'Error deleting the share: {errorMessage}' ,  {  errorMessage } )  : t ( 'files_sharing' ,  'Error deleting the share' ) , 
89+ 					{  type : 'error'  } 
90+ 				) 
8391				throw  error 
8492			} 
8593		} , 
@@ -100,7 +108,11 @@ export default {
100108			}  catch  ( error )  { 
101109				console . error ( 'Error while updating share' ,  error ) 
102110				if  ( error . response . status  !==  400 )  { 
103- 					OC . Notification . showTemporary ( t ( 'files_sharing' ,  'Error updating the share' ) ,  {  type : 'error'  } ) 
111+ 					const  errorMessage  =  error ?. response ?. data ?. ocs ?. meta ?. message 
112+ 					OC . Notification . showTemporary ( 
113+ 						errorMessage  ? t ( 'files_sharing' ,  'Error updating the share: {errorMessage}' ,  {  errorMessage } )  : t ( 'files_sharing' ,  'Error updating the share' ) , 
114+ 						{  type : 'error'  } 
115+ 					) 
104116				} 
105117				const  message  =  error . response . data . ocs . meta . message 
106118				throw  new  Error ( message ) 
0 commit comments