Skip to content

Commit 4001a23

Browse files
authored
Merge pull request #14 from ceeram/patch-1
Add error message to exception
2 parents 9195a11 + 5042f54 commit 4001a23

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/TeamsConnector.php

+4-1
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,11 @@ public function send(TeamsConnectorInterface $card)
3737

3838
$result = curl_exec($ch);
3939

40-
if ($result !== "1") {
40+
if (curl_error($ch)) {
4141
throw new \Exception(curl_error($ch), curl_errno($ch));
4242
}
43+
if ($result !== "1") {
44+
throw new \Exception('Error response: ' . $result);
45+
}
4346
}
4447
}

0 commit comments

Comments
 (0)