Skip to content

Commit

Permalink
Fix handleFormErrors
Browse files Browse the repository at this point in the history
  • Loading branch information
MelissaAutumn committed Oct 15, 2024
1 parent 1efd66c commit a1caea0
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions frontend/src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,8 @@ export const handleFormError = (i18n: any, formRef: Ref, errObj: PydanticExcepti
fields[name].setCustomValidity(msg);
}
});
} else if (typeof detail === 'string') { // HttpException errors are just strings
return detail;
} else {
return detail.message;
}
Expand Down

0 comments on commit a1caea0

Please sign in to comment.