Skip to content

Commit d6f0633

Browse files
committed
set correct status_code in response on http exception
1 parent 80d53e7 commit d6f0633

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Request.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,7 @@ public function parseResponse($data = '', $headersProcessed = false, $returnType
247247
} catch (HttpException $e) {
248248
// failed processing of HTTP response headers
249249
// save into response obj the full payload received, for debugging
250-
return new Response(0, $e->getCode(), $e->getMessage(), '', array('raw_data' => $data, 'status_code', $e->statusCode()));
250+
return new Response(0, $e->getCode(), $e->getMessage(), '', array('raw_data' => $data, 'status_code' => $e->statusCode()));
251251
} catch(\Exception $e) {
252252
return new Response(0, $e->getCode(), $e->getMessage(), '', array('raw_data' => $data));
253253
}

0 commit comments

Comments
 (0)