Skip to content

Commit 7cbbbf6

Browse files
committed
fix: Undefined array key Iteration
1 parent 8dd0270 commit 7cbbbf6

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

app/Coding/Iteration.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
namespace App\Coding;
44

55
use Carbon\Carbon;
6+
use Exception;
67

78
class Iteration extends Base
89
{
@@ -20,6 +21,9 @@ public function create($token, $projectName, $data)
2021
], $data),
2122
]);
2223
$result = json_decode($response->getBody(), true);
24+
if (isset($result['Response']['Error']['Message'])) {
25+
throw new Exception($result['Response']['Error']['Message']);
26+
}
2327
return $result['Response']['Iteration'];
2428
}
2529

0 commit comments

Comments
 (0)