perf: don't catch 404 throw

This catches all exceptions, so e.g., a json parsing error is completely
swallowed without even appearing in the JS console, which makes
debugging difficult.

For golang/go#48803.

Change-Id: If62f153413cdb2dfbeab2d83ddf6aaedc43cce8c
Reviewed-on: https://go-review.googlesource.com/c/build/+/413577
Reviewed-by: Michael Knyszek <mknyszek@google.com>
diff --git a/perf/app/dashboard/index.html b/perf/app/dashboard/index.html
index a39602f..f8f7742 100644
--- a/perf/app/dashboard/index.html
+++ b/perf/app/dashboard/index.html
@@ -124,6 +124,7 @@
 fetch(dataURL)
 	.then(response => {
 		if (!response.ok) {
+			failure(benchmark);
 			throw new Error("Data fetch failed");
 		}
 		return response.json();
@@ -137,10 +138,7 @@
 		});
 
 		addContent(benchmarks);
-	})
-	// This will look odd if the error isn't a 404 and benchmark is
-	// undefined, but close enough.
-	.catch(error => failure(benchmark));
+	});
 </script>
 
 </body>