We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I have checked this
/** @var \Symfony\Component\HttpKernel\Exception\HttpException $ex */ $http_code = $ex->getStatusCode();
And $ex->getStatusCode() indeed returns 404, but at the same time, the final output has 500 status code. Here, I just opened a non-existent route:
$ex->getStatusCode()
404
500
I tried to implement your solution:
\Symfony\Component\HttpKernel\Exception\HttpException::class => [ 'handler' => \MarcinOrlowski\ResponseBuilder\ExceptionHandlers\HttpExceptionHandler::class, 'pri' => -100, 'config' => [ Symfony\Component\HttpFoundation\Response::HTTP_NOT_FOUND => [ 'http_code' => Symfony\Component\HttpFoundation\Response::HTTP_NOT_FOUND, ],
And after that, I receive this error whenever I try to access a wrong route:
{"success":false,"code":113,"locale":"en","message":"Undefined array key \u0022api_code\u0022","data":null,"debug":{"trace":{"class":"ErrorException","file":"\/var\/www\/api\/vendor\/marcin-orlowski\/laravel-api-response-builder\/src\/ExceptionHandlerHelper.php","line":104}}}
Originally posted by @beeyev in #225 (reply in thread)
The text was updated successfully, but these errors were encountered:
Well, it seems, that this problem is a bit bigger. If I try to access a post route as get, it should return 405 code, but instead, it returns 500
post
get
405
Sorry, something went wrong.
Any news?
Unfortunately I haven't had time to take a look at this. Let me try over forthcoming weekend.
No branches or pull requests
I have checked this
And
![image](https://user-images.githubusercontent.com/326840/155376975-d6305056-6b76-4513-b311-5f0750436b41.png)
$ex->getStatusCode()
indeed returns404
, but at the same time, the final output has500
status code.Here, I just opened a non-existent route:
I tried to implement your solution:
And after that, I receive this error whenever I try to access a wrong route:
Originally posted by @beeyev in #225 (reply in thread)
The text was updated successfully, but these errors were encountered: