diff --git a/sanityv3/resolveProductionUrl.js b/sanityv3/resolveProductionUrl.js index c803e33c5..fc389b760 100644 --- a/sanityv3/resolveProductionUrl.js +++ b/sanityv3/resolveProductionUrl.js @@ -9,7 +9,7 @@ const remoteUrl = () => { const env = window.location.hostname.includes('equinor-web-sites-preprod') ? 'preprod' : 'prod' switch (dataset) { case 'global': - return `https://web-equinor-web-sites-${env}.c2.radix.equinor.com/` + return `https://web-equinor-web-sites-${env}.c2.radix.equinor.com` case 'global-development': return 'https://web-global-development-equinor-web-sites-dev.c2.radix.equinor.com' case 'global-test': diff --git a/sanityv3/schemas/components/VideoSelector.tsx b/sanityv3/schemas/components/VideoSelector.tsx index 7daed95a8..cf7ebce7b 100644 --- a/sanityv3/schemas/components/VideoSelector.tsx +++ b/sanityv3/schemas/components/VideoSelector.tsx @@ -64,11 +64,15 @@ const VideoSelector = forwardRef(function VideoSelector( headers: { Authorization: `Basic ${SCREEN9_AUTH}`, }, - }).then((res) => - res.status !== 200 - ? setError(`Could not retrieve url from Screen9. Please report the error to the dev team.`) - : res.json(), - ) + }) + .then((res) => + res.status !== 200 + ? setError('Could not retrieve url from Screen9. Please report the error to the dev team.') + : res.json(), + ) + .catch((error) => { + setError(`Could not retrieve url from Screen9. Please report the error to the dev team. Error: ${error}`) + }) if (!data.error) { const video = {