From 0a3cd3fc0545df6d6c53a150789e756d174149f5 Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Fri, 21 May 2021 20:16:09 -0500 Subject: [PATCH] Return detailed alert on HTTP 502 --- app/soapbox/actions/alerts.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/soapbox/actions/alerts.js b/app/soapbox/actions/alerts.js index 01fdd3ccf..22ca16138 100644 --- a/app/soapbox/actions/alerts.js +++ b/app/soapbox/actions/alerts.js @@ -35,6 +35,10 @@ export function showAlertForError(error) { if (error.response) { const { data, status, statusText } = error.response; + if (status === 502) { + return showAlert('', 'The server is down', 'error'); + } + if (status === 404 || status === 410) { // Skip these errors as they are reflected in the UI return {};