Err content returned as string from core

This commit is contained in:
nklhrstv 2020-10-30 09:39:46 +02:00
parent 2f0aeb1f38
commit e4e4784dc3
2 changed files with 2 additions and 20 deletions

View file

@ -40,21 +40,12 @@ const Board = () => {
);
}
case 'Err': {
const type = `Error(${catalog.content.content.type})`;
const description = catalog.content.content.type === 'UnexpectedResponse' ?
catalog.content.content.content
:
catalog.content.content.type === 'Env' ?
catalog.content.content.content.message
:
null;
const message = `${type}${description !== null ? ` ${description}` : null}`;
return (
<MetaRow
key={index}
className={styles['board-row']}
title={catalog.title}
message={message}
message={catalog.content.content}
deepLinks={catalog.deepLinks}
/>
);

View file

@ -63,21 +63,12 @@ const Search = ({ queryParams }) => {
);
}
case 'Err': {
const type = `Error(${catalog.content.content.type})`;
const description = catalog.content.content.type === 'UnexpectedResponse' ?
catalog.content.content.content
:
catalog.content.content.type === 'Env' ?
catalog.content.content.content.message
:
'';
const message = `${type}${description !== null ? ` ${description}` : null}`;
return (
<MetaRow
key={index}
className={styles['search-row']}
title={catalog.title}
message={message}
message={catalog.content.content}
deepLinks={catalog.deepLinks}
/>
);