Skip to content

Commit a1e73bc

Browse files
committed
Better AbraFlexi\Exception message
1 parent 3848cae commit a1e73bc

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/AbraFlexi/RO.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1166,7 +1166,8 @@ public function parseResponse($responseDecoded, $responseCode) {
11661166
}
11671167
$this->addStatusMessage($this->lastResponseCode . ': ' . $this->curlInfo['url'] . ' (' . $this->format . ') ' . json_encode($this->getErrors()), 'warning');
11681168
if ($this->throwException) {
1169-
throw new Exception('Problem', $this);
1169+
$errors = $this->getErrors();
1170+
throw new Exception( empty($errors) ? 'Problem ' : $errors[0]['message'] , $this);
11701171
}
11711172
break;
11721173
}

0 commit comments

Comments
 (0)