Skip to content

Commit 5fc1df3

Browse files
committed
incorporate pydata#1755
1 parent d663d11 commit 5fc1df3

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/pydata_sphinx_theme/assets/scripts/pydata-sphinx-theme.js

+5
Original file line numberDiff line numberDiff line change
@@ -707,6 +707,11 @@ async function setupAnnouncementBanner() {
707707

708708
try {
709709
const response = await fetch(pstAnnouncementUrl);
710+
if (!response.ok) {
711+
throw new Error(
712+
`[PST]: HTTP response status not ok: ${response.status} ${response.statusText}`,
713+
);
714+
}
710715
const data = await response.text();
711716
if (data.length === 0) {
712717
console.log(`[PST]: Empty announcement at: ${pstAnnouncementUrl}`);

0 commit comments

Comments
 (0)