From f63c511149078d165ba1b8e2348bcdd2dc8da3bb Mon Sep 17 00:00:00 2001 From: azernik Date: Sun, 10 Jan 2021 20:52:36 +0200 Subject: [PATCH] fixed error handler for create squeak (#588) --- frontend/src/components/MakeSqueakDialog/MakeSqueakDialog.js | 3 ++- frontend/src/squeakclient/requests.js | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/frontend/src/components/MakeSqueakDialog/MakeSqueakDialog.js b/frontend/src/components/MakeSqueakDialog/MakeSqueakDialog.js index d8c0863b..8a03395b 100644 --- a/frontend/src/components/MakeSqueakDialog/MakeSqueakDialog.js +++ b/frontend/src/components/MakeSqueakDialog/MakeSqueakDialog.js @@ -19,6 +19,7 @@ import { InputLabel, Select, } from "@material-ui/core"; + import { MoreVert as MoreIcon } from "@material-ui/icons"; import {useHistory} from "react-router-dom"; import classnames from "classnames"; @@ -66,7 +67,7 @@ export default function MakeSqueakDialog({ }; const handleErr = (err) => { - alert('Error making squeak: ' + err.message); + alert('Error making squeak: ' + err); }; const createSqueak = (profileId, content, replyto) => { diff --git a/frontend/src/squeakclient/requests.js b/frontend/src/squeakclient/requests.js index c02eca8b..40199a61 100644 --- a/frontend/src/squeakclient/requests.js +++ b/frontend/src/squeakclient/requests.js @@ -669,6 +669,7 @@ export function makeSqueakRequest(profileId, content, replyto, handleResponse, h request, MakeSqueakReply.deserializeBinary, handleResponse, + handleErr, ); };