File tree Expand file tree Collapse file tree 1 file changed +5
-0
lines changed Expand file tree Collapse file tree 1 file changed +5
-0
lines changed Original file line number Diff line number Diff line change 3
3
namespace Markup \Contentful ;
4
4
5
5
use Markup \Contentful \Exception \LinkUnresolvableException ;
6
+ use Markup \Contentful \Exception \ResourceUnavailableException ;
6
7
7
8
class Entry implements EntryInterface
8
9
{
@@ -62,6 +63,8 @@ public function getField($key)
62
63
$ resolvedLink = call_user_func ($ this ->resolveLinkFunction , $ this ->fields [$ key ])->wait ();
63
64
} catch (LinkUnresolvableException $ e ) {
64
65
$ resolvedLink = null ;
66
+ } catch (ResourceUnavailableException $ e ) {
67
+ $ resolvedLink = null ;
65
68
}
66
69
$ this ->resolvedLinks [$ key ] = $ resolvedLink ;
67
70
}
@@ -76,6 +79,8 @@ public function getField($key)
76
79
} catch (LinkUnresolvableException $ e ) {
77
80
//if the link is unresolvable we should consider it not published and return null so this is filtered out
78
81
return null ;
82
+ } catch (ResourceUnavailableException $ e ) {
83
+ return null ;
79
84
}
80
85
81
86
return $ resolvedLink ;
You can’t perform that action at this time.
0 commit comments