[Glitch] Fix glitched out "not found" message for non-existing profiles in web UI

Port 56f29c38b6 to glitch-soc
This commit is contained in:
Eugen Rochko
2019-04-09 05:02:48 +02:00
committed by Thibaut Girka
parent fa4b51a110
commit 92e1950194
6 changed files with 54 additions and 6 deletions

View File

@ -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}`;