Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions src/lib/oa-rpde.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ class OpenActiveRpde {
try {
log(`Fetching ${nextURL}`);
let res = await fetch(nextURL);
if (!res.ok) {
throw res.status + " - " + res.statusText;
}

let activitiesJson = await res.json();

Expand Down
4 changes: 4 additions & 0 deletions src/lib/stage-both.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@ async function processBothStages() {
await Utils.loadActivitiesJSONIntoCache();

let res = await fetch(Settings.registryURL);
if (!res.ok) {
throw res.status + " - " + res.statusText;
}

let registryJson = await res.json();

for (const publisherKey in registryJson.data) {
Expand Down
3 changes: 3 additions & 0 deletions src/lib/stage1.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ async function processStage1() {
}

let res = await fetch(Settings.registryURL);
if (!res.ok) {
throw res.status + " - " + res.statusText;
}
let registryJson = await res.json();

for (const publisherKey in registryJson.data) {
Expand Down
3 changes: 3 additions & 0 deletions src/lib/stage2.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ async function processStage2() {
await Utils.loadActivitiesJSONIntoCache();

let res = await fetch(Settings.registryURL);
if (!res.ok) {
throw res.status + " - " + res.statusText;
}
let registryJson = await res.json();

for (const publisherKey in registryJson.data) {
Expand Down
4 changes: 3 additions & 1 deletion src/lib/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,9 @@ class Utils {


const res = await fetch(Settings.activityListJSONLD);
// TODO detect non 200 responses
if (!res.ok) {
throw res.status + " - " + res.statusText;
}
const activitiesData = await res.json();


Expand Down