Commit 7c08745
Jarret Lavallee
(GH-81) Handle an empty array when PuppetDB is down
Prior to this commit, the collection would fail with a undefined method
when there was a PuppetDB instance that was offline. This commit adds a
check to ensure that the undefined method error does not happen, while
maintaining the error array. This was reproducable by stopping PuppetDB
and running PuppetDB collection. It would previously fail to do the
collection and throw an exception. After this commnit, the collection
will complete and the error array will be updated with the connection
failure.1 parent da73e8d commit 7c08745
1 file changed
+2
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
124 | 124 | | |
125 | 125 | | |
126 | 126 | | |
| 127 | + | |
127 | 128 | | |
128 | 129 | | |
| 130 | + | |
129 | 131 | | |
130 | | - | |
131 | 132 | | |
132 | 133 | | |
133 | 134 | | |
| |||
0 commit comments