Skip to content

Commit c4a374d

Browse files
author
Tobia Zanarella
committed
Improved exception message on Invalid response code, ie. 400
1 parent b8baa76 commit c4a374d

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"description": "PHP LetsEncrypt client library for ACME v2",
55
"license": "MIT",
66
"require": {
7-
"php": ">=5.2",
7+
"php": ">=8.0",
88
"ext-openssl": "*",
99
"ext-json": "*",
1010
"ext-curl": "*"

src/Exceptions/LEConnectorException.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,6 @@ public static function CurlErrorException(string $error)
6666
public static function InvalidResponseException(array $response)
6767
{
6868
$statusCode = array_key_exists('status', $response) ? $response['status'] : 'unknown';
69-
return new static(sprintf('Invalid response: %s', $statusCode), self::INVALIDRESPONSEEXCEPTION, null, $response);
69+
return new static(sprintf('Invalid response: %s - %s', $statusCode, json_encode($response)), self::INVALIDRESPONSEEXCEPTION, null, $response);
7070
}
7171
}

0 commit comments

Comments
 (0)