Skip to content
This repository was archived by the owner on Jul 9, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,8 @@ type ErrorPopupProps = {
onDismiss: () => void;
};

const formatErrorTitle = (error: StateError): string => {
const { summary } = error;
if (!summary) return '';
const formatErrorTitle = (summary: string): string => {
if (!summary) return formatMessage('Error');
return summary.length > 20 ? summary.substring(0, 20) + '...' : summary;
};

Expand Down Expand Up @@ -62,7 +61,7 @@ export const ErrorPopup = (props: ErrorPopupProps) => {
}
}, [props.error]);

const title = props.error ? formatErrorTitle(props.error) : '';
const title = formatErrorTitle(props?.error?.summary);
const detail = props.error ? formatErrorDetail(props.error) : '';

return (
Expand Down
5 changes: 3 additions & 2 deletions Composer/packages/client/src/components/ErrorPopup/styles.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,11 @@ import { FontWeights, FontSizes } from 'office-ui-fabric-react/lib/Styling';
import { NeutralColors, SharedColors } from '@uifabric/fluent-theme';

export const consoleStyle = css`
background: ${NeutralColors.black};
color: ${NeutralColors.white};
background: ${NeutralColors.gray20};
padding: 15px;
margin-bottom: 20px;
overflow-y: auto;
max-height: 434px;

a {
color: ${SharedColors.blueMagenta10};
Expand Down