set correct status_code in response on http exception
authorgggeek <giunta.gaetano@gmail.com>
Thu, 27 Jun 2024 08:35:19 +0000 (08:35 +0000)
committergggeek <giunta.gaetano@gmail.com>
Thu, 27 Jun 2024 08:35:19 +0000 (08:35 +0000)
src/Request.php

index 8da377b..bf76741 100644 (file)
@@ -247,7 +247,7 @@ class Request
             } catch (HttpException $e) {
                 // failed processing of HTTP response headers
                 // save into response obj the full payload received, for debugging
-                return new Response(0, $e->getCode(), $e->getMessage(), '', array('raw_data' => $data, 'status_code', $e->statusCode()));
+                return new Response(0, $e->getCode(), $e->getMessage(), '', array('raw_data' => $data, 'status_code' => $e->statusCode()));
             } catch(\Exception $e) {
                 return new Response(0, $e->getCode(), $e->getMessage(), '', array('raw_data' => $data));
             }