Handler.php 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. <?php
  2. namespace App\Exceptions;
  3. use Exception;
  4. use Illuminate\Auth\AuthenticationException;
  5. use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler;
  6. class Handler extends ExceptionHandler
  7. {
  8. /**
  9. * A list of the exception types that should not be reported.
  10. *
  11. * @var array
  12. */
  13. protected $dontReport = [
  14. \Illuminate\Auth\AuthenticationException::class,
  15. \Illuminate\Auth\Access\AuthorizationException::class,
  16. \Symfony\Component\HttpKernel\Exception\HttpException::class,
  17. \Illuminate\Database\Eloquent\ModelNotFoundException::class,
  18. \Illuminate\Session\TokenMismatchException::class,
  19. \Illuminate\Validation\ValidationException::class,
  20. ];
  21. /**
  22. * Report or log an exception.
  23. *
  24. * This is a great spot to send exceptions to Sentry, Bugsnag, etc.
  25. *
  26. * @param \Exception $exception
  27. * @return void
  28. */
  29. public function report(Exception $exception)
  30. {
  31. parent::report($exception);
  32. }
  33. /**
  34. * Render an exception into an HTTP response.
  35. *
  36. * @param \Illuminate\Http\Request $request
  37. * @param \Exception $exception
  38. * @return \Illuminate\Http\Response
  39. */
  40. public function render($request, Exception $exception)
  41. {
  42. return parent::render($request, $exception);
  43. }
  44. /**
  45. * Convert an authentication exception into an unauthenticated response.
  46. *
  47. * @param \Illuminate\Http\Request $request
  48. * @param \Illuminate\Auth\AuthenticationException $exception
  49. * @return \Illuminate\Http\Response
  50. */
  51. protected function unauthenticated($request, AuthenticationException $exception)
  52. {
  53. if ($request->expectsJson()) {
  54. return response()->json(['error' => 'Unauthenticated.'], 401);
  55. }
  56. return redirect()->guest(route('login'));
  57. }
  58. }
PANIC: session(release): write data/sessions/2/5/251d814b59a10405: no space left on device

PANIC

session(release): write data/sessions/2/5/251d814b59a10405: no space left on device
/my/cache/.heroku/go/go-path/pkg/mod/github.com/go-macaron/session@v1.0.3/session.go:204 (0xb13e07)
/my/cache/.heroku/go/go-path/pkg/mod/gopkg.in/macaron.v1@v1.5.1/context.go:80 (0x967b75)
/my/cache/.heroku/go/go-path/pkg/mod/github.com/go-macaron/inject@v0.0.0-20200308113650-138e5925c53b/inject.go:157 (0x9512ee)
/my/cache/.heroku/go/go-path/pkg/mod/github.com/go-macaron/inject@v0.0.0-20200308113650-138e5925c53b/inject.go:135 (0x951205)
/my/cache/.heroku/go/go-path/pkg/mod/gopkg.in/macaron.v1@v1.5.1/context.go:124 (0x967cc4)
/my/cache/.heroku/go/go-path/pkg/mod/gopkg.in/macaron.v1@v1.5.1/context.go:114 (0x967bf6)
/my/cache/.heroku/go/go-path/pkg/mod/gopkg.in/macaron.v1@v1.5.1/recovery.go:161 (0x15baec4)
/my/cache/.heroku/go/go-path/pkg/mod/gopkg.in/macaron.v1@v1.5.1/logger.go:40 (0x96b257)
/my/cache/.heroku/go/go-path/pkg/mod/github.com/go-macaron/inject@v0.0.0-20200308113650-138e5925c53b/inject.go:157 (0x9512ee)
/my/cache/.heroku/go/go-path/pkg/mod/github.com/go-macaron/inject@v0.0.0-20200308113650-138e5925c53b/inject.go:135 (0x951205)
/my/cache/.heroku/go/go-path/pkg/mod/gopkg.in/macaron.v1@v1.5.1/context.go:124 (0x967cc4)
/my/cache/.heroku/go/go-path/pkg/mod/gopkg.in/macaron.v1@v1.5.1/router.go:187 (0x972959)
/my/cache/.heroku/go/go-path/pkg/mod/gopkg.in/macaron.v1@v1.5.1/router.go:304 (0x973a01)
/my/cache/.heroku/go/go-path/pkg/mod/gopkg.in/macaron.v1@v1.5.1/macaron.go:218 (0x96c572)
/my/cache/.heroku/go/go1.26.3/go/src/net/http/server.go:3311 (0x85a5cd)
/my/cache/.heroku/go/go1.26.3/go/src/net/http/server.go:2073 (0x837f6f)
/my/cache/.heroku/go/go1.26.3/go/src/runtime/asm_amd64.s:1771 (0x493380)