Skip to content
This repository was archived by the owner on Apr 29, 2024. It is now read-only.

Commit f3507d6

Browse files
author
Kirill Fuchs
committed
simplified exception message and code
1 parent ea536fd commit f3507d6

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

Diff for: src/HttpException.php

+2-7
Original file line numberDiff line numberDiff line change
@@ -80,13 +80,8 @@ public function __construct(int $statusCode = null, string $error = null, string
8080
$this->userMessage = $userMessage ?? 'Seems one of our developers unplugged the server again!';
8181
$this->httpHeaders = $httpHeaders;
8282

83-
$originalMessage = '';
84-
$originalCode = 0;
85-
86-
if ($previous) {
87-
$originalMessage = $previous->getMessage();
88-
$originalCode = $previous->getCode();
89-
}
83+
$originalMessage = $errorDescription;
84+
$originalCode = $statusCode;
9085

9186
parent::__construct($originalMessage, $originalCode, $previous);
9287
}

0 commit comments

Comments
 (0)