@@ -187,7 +187,7 @@ const handleCompleteTask = async (task: Task) => {
187187 await refreshNuxtData ()
188188 } catch (error : any ) {
189189 toast .add ({
190- title: ' Failed to approve task completion ' ,
190+ title: getApiErrorMessage ( error ) ,
191191 color: ' error' ,
192192 progress: false ,
193193 })
@@ -212,7 +212,7 @@ const handleRejectTask = async (task: Task) => {
212212 await refreshNuxtData ()
213213 } catch (error : any ) {
214214 toast .add ({
215- title: ' Failed to reject task completion ' ,
215+ title: getApiErrorMessage ( error ) ,
216216 color: ' error' ,
217217 progress: false ,
218218 })
@@ -237,7 +237,7 @@ const handleDeleteTask = async (task: Task) => {
237237 await refreshNuxtData ()
238238 } catch (error : any ) {
239239 toast .add ({
240- title: ' Failed to delete task ' ,
240+ title: getApiErrorMessage ( error ) ,
241241 color: ' error' ,
242242 progress: false ,
243243 })
@@ -275,7 +275,7 @@ const editTaskSubmit = async () => {
275275 await refreshNuxtData ()
276276 } catch (error : any ) {
277277 toast .add ({
278- title: ' Failed to update task ' ,
278+ title: getApiErrorMessage ( error ) ,
279279 color: ' error' ,
280280 progress: false ,
281281 })
@@ -314,7 +314,7 @@ const handleCompleteReward = async (reward: Reward) => {
314314 await refreshNuxtData ()
315315 } catch (error : any ) {
316316 toast .add ({
317- title: ' Failed to approve reward redemption ' ,
317+ title: getApiErrorMessage ( error ) ,
318318 color: ' error' ,
319319 progress: false ,
320320 })
@@ -374,7 +374,7 @@ const editRewardSubmit = async () => {
374374 await refreshNuxtData ()
375375 } catch (error : any ) {
376376 toast .add ({
377- title: ' Failed to update reward ' ,
377+ title: getApiErrorMessage ( error ) ,
378378 color: ' error' ,
379379 progress: false ,
380380 })
@@ -399,7 +399,7 @@ const handleRejectReward = async (reward: Reward) => {
399399 await refreshNuxtData ()
400400 } catch (error : any ) {
401401 toast .add ({
402- title: ' Failed to reject reward redemption ' ,
402+ title: getApiErrorMessage ( error ) ,
403403 color: ' error' ,
404404 progress: false ,
405405 })
@@ -424,7 +424,7 @@ const handleDeleteReward = async (reward: Reward) => {
424424 await refreshNuxtData ()
425425 } catch (error : any ) {
426426 toast .add ({
427- title: ' Failed to delete reward ' ,
427+ title: getApiErrorMessage ( error ) ,
428428 color: ' error' ,
429429 progress: false ,
430430 })
0 commit comments