From aa6c90957287ca054128cd3cbc22dbef3dbb3f25 Mon Sep 17 00:00:00 2001 From: Frode Petterson Date: Tue, 10 Nov 2020 14:10:22 +0100 Subject: [PATCH] Add support for 404 when trying to update content --- h5p.classes.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/h5p.classes.php b/h5p.classes.php index f01e312..8285105 100644 --- a/h5p.classes.php +++ b/h5p.classes.php @@ -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.')); }