Github 'Not Found' for unplublished entries means there are no unpublished entries
This commit is contained in:
parent
e34ce15485
commit
14c798517c
@ -67,7 +67,7 @@ function unpublishedEntriesFailed(error) {
|
||||
return {
|
||||
type: UNPUBLISHED_ENTRIES_FAILURE,
|
||||
error: 'Failed to load entries',
|
||||
payload: error.toString(),
|
||||
payload: error,
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -100,6 +100,12 @@ export default class GitHub {
|
||||
}));
|
||||
});
|
||||
return Promise.all(promises);
|
||||
})
|
||||
.catch((error) => {
|
||||
if (error.message === 'Not Found') {
|
||||
return Promise.resolve([]);
|
||||
}
|
||||
return error;
|
||||
});
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user