From 92e19501949bac3825c23087e0aeba3109ea12d0 Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Tue, 9 Apr 2019 05:02:48 +0200 Subject: [Glitch] Fix glitched out "not found" message for non-existing profiles in web UI Port 56f29c38b603a98e7b9715c48de022106d8da073 to glitch-soc --- app/javascript/flavours/glitch/actions/alerts.js | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'app/javascript/flavours/glitch/actions/alerts.js') diff --git a/app/javascript/flavours/glitch/actions/alerts.js b/app/javascript/flavours/glitch/actions/alerts.js index 50cd48a9e..b2c7ab76a 100644 --- a/app/javascript/flavours/glitch/actions/alerts.js +++ b/app/javascript/flavours/glitch/actions/alerts.js @@ -34,6 +34,11 @@ export function showAlertForError(error) { if (error.response) { const { data, status, statusText } = error.response; + if (status === 404 || status === 410) { + // Skip these errors as they are reflected in the UI + return {}; + } + let message = statusText; let title = `${status}`; -- cgit