-
Notifications
You must be signed in to change notification settings - Fork 322
Closed
Description
- Octane Version: 1.3.6
- Laravel Version: 9.*
- PHP Version: 8.1.12
- Server & Version: Swoole
- Database Driver & Version:
Description:
I realised whenever a exception thrown in Octane::route it also get dump in console (swoole server) there is not issue with traditional laravel route
Steps To Reproduce:
Dockerfile:
FROM phpswoole/swoole:php8.1
WORKDIR /var/www/html
COPY --from=composer /usr/bin/composer /usr/bin/composer
RUN composer create-project laravel/laravel .
RUN mv ./.env.example .env
RUN php artisan key:generate
RUN composer require laravel/octane
RUN php artisan octane:install --server=swoole
RUN curl https://gist.githubusercontent.com/foremtehan/84d88c03544feea099c583dd71acb394/raw/341885b3794045f5dfb82c1e3c9ce7192cf16134/routes.php > routes/web.php
EXPOSE 9000
ENTRYPOINT ["/bin/bash", "-c", "php /var/www/html/artisan octane:start --server=swoole --host=0.0.0.0 --port=9000 --max-requests=1500"]
routes/web.php (included in the image)
Route::get('/', function () {
throw new Exception('exception from laravel route');
});
Octane::route('GET', '/endpoint', function () {
throw new Exception('exception from octane route');
});docker build -t octane .
docker run -d -p 9000:9000 --name=dump octane
docker logs -f dump
Hit the http://localhost:9000/ no issue (no output in console)
But now head over to http://localhost:9000/endpoint, You will see this output in console:
Metadata
Metadata
Assignees
Labels
No labels
