|
@@ -73,7 +73,7 @@ discard block |
|
|
block discarded – undo |
|
73
|
73
|
* @return \Symfony\Component\HttpFoundation\Response |
|
74
|
74
|
*/ |
|
75
|
75
|
protected static function processException(\Throwable $ex, array $ex_cfg, |
|
76
|
|
- int $fallback_http_code = HttpResponse::HTTP_INTERNAL_SERVER_ERROR) |
|
|
76
|
+ int $fallback_http_code = HttpResponse::HTTP_INTERNAL_SERVER_ERROR) |
|
77
|
77
|
{ |
|
78
|
78
|
$api_code = $ex_cfg['api_code']; |
|
79
|
79
|
$http_code = $ex_cfg['http_code'] ?? $fallback_http_code; |
|
@@ -140,7 +140,7 @@ discard block |
|
|
block discarded – undo |
|
140
|
140
|
* @return HttpResponse |
|
141
|
141
|
*/ |
|
142
|
142
|
protected function unauthenticated(/** @scrutinizer ignore-unused */ $request, |
|
143
|
|
- AuthException $exception): HttpResponse |
|
|
143
|
+ AuthException $exception): HttpResponse |
|
144
|
144
|
{ |
|
145
|
145
|
$cfg = self::getExceptionHandlerConfig(); |
|
146
|
146
|
|
|
@@ -161,7 +161,7 @@ discard block |
|
|
block discarded – undo |
|
161
|
161
|
* @return HttpResponse |
|
162
|
162
|
*/ |
|
163
|
163
|
protected static function error(Throwable $ex, |
|
164
|
|
- int $api_code, int $http_code = null, string $error_message = null): HttpResponse |
|
|
164
|
+ int $api_code, int $http_code = null, string $error_message = null): HttpResponse |
|
165
|
165
|
{ |
|
166
|
166
|
$ex_http_code = ($ex instanceof HttpException) ? $ex->getStatusCode() : $ex->getCode(); |
|
167
|
167
|
$http_code = $http_code ?? $ex_http_code; |
Please login to merge, or discard this patch.