Skip to content

Commit

Permalink
Show error message from backend on CTD save (#1248)
Browse files Browse the repository at this point in the history
  • Loading branch information
Zoltan Takacs authored Mar 23, 2021
1 parent 5fc068e commit 868a580
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ export const NewFileTextEditor: React.FunctionComponent<NewFileTextEditorProps>
} catch (err) {
setHasChanges(true)
logger.error({
message: localization.textEditor.saveFailedNotification.replace('{0}', fileName),
message: err.message || localization.textEditor.saveFailedNotification.replace('{0}', fileName),
data: {
error: err,
},
Expand Down
10 changes: 6 additions & 4 deletions apps/sensenet/src/components/editor/text-editor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -80,10 +80,12 @@ export const TextEditor: React.FunctionComponent<TextEditorProps> = (props) => {
} catch (err) {
setHasChanges(true)
logger.error({
message: localization.textEditor.saveFailedNotification.replace(
'{0}',
props.content.DisplayName || props.content.Name,
),
message:
err.message ||
localization.textEditor.saveFailedNotification.replace(
'{0}',
props.content.DisplayName || props.content.Name,
),
data: {
error: err,
},
Expand Down

0 comments on commit 868a580

Please sign in to comment.