From d27062c99fb41747d0983ccc5a67867ad558b7b5 Mon Sep 17 00:00:00 2001 From: "James E. Blair" Date: Tue, 2 Feb 2021 17:06:16 -0800 Subject: [PATCH] Don't bail on fetchBuildAllInfo if fetchBuildManifest fails If we fail to fetch an expected manifest (eg, it returns a 404), then currently the fetch of the build info is marked as a failure and the ui says that the build does not exist. This is misleading and we should actually display as much build info as we have even if we weren't able to fetch the manifest. This change will cause, in the case of a 404 for the manifest, a toast to display the error regarding the fetch manifest failure, but underneath it the rest of the build page will display as normal. The line being removed was intended to avoid a failure which can happen if the user visits a log page and the manifest has not been fetched. However, the user is only likely to visit the log url if the manifest has been fetched since the manifest is required to supply the index of log files. So this case does not need to be specially handled. Change-Id: If87a8de8895c4556306cd7145f4a235b6f786a6a --- web/src/actions/build.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/web/src/actions/build.js b/web/src/actions/build.js index ef8b5f530e..f6b4ff1de4 100644 --- a/web/src/actions/build.js +++ b/web/src/actions/build.js @@ -370,10 +370,9 @@ export function fetchBuildManifest(buildId, state) { const response = await Axios.get(artifact.url) return dispatch(receiveBuildManifest(buildId, response.data)) } catch(error) { + // Show the error since we expected a manifest but did not + // receive it. dispatch(failedBuildManifest(buildId, error, artifact.url)) - // Raise the error again, so fetchBuildAllInfo() doesn't call - // fetchLogFile which needs an existing manifest file. - throw error } } }