Skip to content

Commit

Permalink
Merge pull request #1030 from pateljannat/fix-evaluation-issue
Browse files Browse the repository at this point in the history
fix: evaluation error message issue
  • Loading branch information
pateljannat authored Sep 25, 2024
2 parents b74c167 + 33c76e8 commit 41ad3d0
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions frontend/src/components/Modals/EvaluationModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -131,10 +131,16 @@ function submitEvaluation(close) {
},
onError(err) {
let message = err.messages?.[0] || err
let unavailabilityMessage = message.includes('unavailable')
let unavailabilityMessage
if (typeof message === 'string') {
unavailabilityMessage = message?.includes('unavailable')
} else {
unavailabilityMessage = false
}
createToast({
title: unavailabilityMessage ? 'Evaluator is Unavailable' : 'Error',
title: unavailabilityMessage ? __('Evaluator is Unavailable') : '',
text: message,
icon: unavailabilityMessage ? 'alert-circle' : 'x',
iconClasses: 'bg-yellow-600 text-white rounded-md p-px',
Expand Down

0 comments on commit 41ad3d0

Please sign in to comment.