Add support for 404 when trying to update content

content-hub
Frode Petterson 2020-11-10 14:10:22 +01:00
parent 0ba2496c11
commit aa6c909572
1 changed files with 4 additions and 0 deletions

View File

@ -3751,6 +3751,10 @@ class H5PCore {
}
if (isset($response['status']) && $response['status'] !== 200) {
if ($response['status'] === 404) {
$this->h5pF->setErrorMessage($this->h5pF->t('Content is not shared on the H5P OER Hub.'));
return NULL;
}
throw new Exception($this->h5pF->t('Connecting to the content hub failed, please try again later.'));
}