Distinguish between errors with and without details

This commit is contained in:
René Pfeuffer
2020-11-11 11:37:24 +01:00
parent 5b44be5e5b
commit 8cfbc60fea
5 changed files with 41 additions and 8 deletions

View File

@@ -71,7 +71,17 @@ class BackendErrorNotification extends React.Component<Props> {
renderAdditionalMessages = () => {
const { error, t } = this.props;
if (error.additionalMessages) {
return error.additionalMessages.map(a => a.key ? t(`errors.${a.key}.description`) : a.message).map(m => <p>{m}</p>);
return (
<>
<hr />
{error.additionalMessages
.map(a => (a.key ? t(`errors.${a.key}.description`) : a.message))
.map(m => (
<p>{m}</p>
))}
<hr />
</>
);
}
};