http://jccpauatdkbackend.vizzhost.com/api/ibeacons?major=44&minor=467

Exceptions

Serialization for the format html is not supported

Exception

Symfony\Component\Serializer\Exception\ NotEncodableValueException

  1.      * {@inheritdoc}
  2.      */
  3.     final public function serialize($data$format, array $context = [])
  4.     {
  5.         if (!$this->supportsEncoding($format$context)) {
  6.             throw new NotEncodableValueException(sprintf('Serialization for the format %s is not supported'$format));
  7.         }
  8.         if ($this->encoder->needsNormalization($format$context)) {
  9.             $data $this->normalize($data$format$context);
  10.         }
  1.         $context['resources_to_push'] = &$resourcesToPush;
  2.         $context[AbstractObjectNormalizer::EXCLUDE_FROM_CACHE_KEY][] = 'resources_to_push';
  3.         $request->attributes->set('_api_normalization_context'$context);
  4.         $event->setControllerResult($this->serializer->serialize($controllerResult$request->getRequestFormat(), $context));
  5.         $request->attributes->set('_resources'$request->attributes->get('_resources', []) + (array) $resources);
  6.         if (!\count($resourcesToPush)) {
  7.             return;
  8.         }
  1.         $this->called true;
  2.         $this->priority $dispatcher->getListenerPriority($eventName$this->listener);
  3.         $e $this->stopwatch->start($this->name'event_listener');
  4.         ($this->optimizedListener ?? $this->listener)($event$eventName$dispatcher);
  5.         if ($e->isStarted()) {
  6.             $e->stop();
  7.         }
  1.     {
  2.         foreach ($listeners as $listener) {
  3.             if ($event->isPropagationStopped()) {
  4.                 break;
  5.             }
  6.             $listener($event$eventName$this);
  7.         }
  8.     }
  9.     /**
  10.      * Sorts the internal list of listeners for the given event by priority.
  1.      * @param object     $event     The event object to pass to the event handlers/listeners
  2.      */
  3.     protected function callListeners(iterable $listenersstring $eventName$event)
  4.     {
  5.         if ($event instanceof Event) {
  6.             $this->doDispatch($listeners$eventName$event);
  7.             return;
  8.         }
  9.         $stoppable $event instanceof ContractsEvent || $event instanceof StoppableEventInterface;
  1.         } else {
  2.             $listeners $this->getListeners($eventName);
  3.         }
  4.         if ($listeners) {
  5.             $this->callListeners($listeners$eventName$event);
  6.         }
  7.         return $event;
  8.     }
  1.         try {
  2.             $this->beforeDispatch($eventName$event);
  3.             try {
  4.                 $e $this->stopwatch->start($eventName'section');
  5.                 try {
  6.                     $this->dispatcher->dispatch($event$eventName);
  7.                 } finally {
  8.                     if ($e->isStarted()) {
  9.                         $e->stop();
  10.                     }
  11.                 }
  1.         $response $controller(...$arguments);
  2.         // view
  3.         if (!$response instanceof Response) {
  4.             $event = new ViewEvent($this$request$type$response);
  5.             $this->dispatcher->dispatch($eventKernelEvents::VIEW);
  6.             if ($event->hasResponse()) {
  7.                 $response $event->getResponse();
  8.             } else {
  9.                 $msg sprintf('The controller must return a "Symfony\Component\HttpFoundation\Response" object but it returned %s.'$this->varToString($response));
  1.     public function handle(Request $request$type HttpKernelInterface::MASTER_REQUEST$catch true)
  2.     {
  3.         $request->headers->set('X-Php-Ob-Level', (string) ob_get_level());
  4.         try {
  5.             return $this->handleRaw($request$type);
  6.         } catch (\Exception $e) {
  7.             if ($e instanceof RequestExceptionInterface) {
  8.                 $e = new BadRequestHttpException($e->getMessage(), $e);
  9.             }
  10.             if (false === $catch) {
  1.         $this->boot();
  2.         ++$this->requestStackSize;
  3.         $this->resetServices true;
  4.         try {
  5.             return $this->getHttpKernel()->handle($request$type$catch);
  6.         } finally {
  7.             --$this->requestStackSize;
  8.         }
  9.     }
Kernel->handle(object(Request)) in public/index.php (line 25)
  1.     Request::setTrustedHosts([$trustedHosts]);
  2. }
  3. $kernel = new Kernel($_SERVER['APP_ENV'], (bool) $_SERVER['APP_DEBUG']);
  4. $request Request::createFromGlobals();
  5. $response $kernel->handle($request);
  6. $response->send();
  7. $kernel->terminate($request$response);

Stack Trace

NotEncodableValueException

Symfony\Component\Serializer\Exception\NotEncodableValueException:
Serialization for the format html is not supported

  at vendor/symfony/serializer/Serializer.php:121
  at Symfony\Component\Serializer\Serializer->serialize(object(Paginator), 'html', array('operation_type' => 'collection', 'collection_operation_name' => 'get', 'resource_class' => 'App\\Entity\\Ibeacon', 'input' => null, 'output' => null, 'request_uri' => '/api/ibeacons?major=44&minor=467', 'uri' => 'http://jccpauatdkbackend.vizzhost.com/api/ibeacons?major=44&minor=467', 'resources' => object(ResourceList), 'exclude_from_cache_key' => array('resources', 'resources_to_push'), 'resources_to_push' => object(ResourceList)))
     (vendor/api-platform/core/src/EventListener/SerializeListener.php:95)
  at ApiPlatform\Core\EventListener\SerializeListener->onKernelView(object(ViewEvent), 'kernel.view', object(TraceableEventDispatcher))
     (vendor/symfony/event-dispatcher/Debug/WrappedListener.php:126)
  at Symfony\Component\EventDispatcher\Debug\WrappedListener->__invoke(object(ViewEvent), 'kernel.view', object(TraceableEventDispatcher))
     (vendor/symfony/event-dispatcher/EventDispatcher.php:260)
  at Symfony\Component\EventDispatcher\EventDispatcher->doDispatch(array(object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener)), 'kernel.view', object(ViewEvent))
     (vendor/symfony/event-dispatcher/EventDispatcher.php:235)
  at Symfony\Component\EventDispatcher\EventDispatcher->callListeners(array(object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener)), 'kernel.view', object(ViewEvent))
     (vendor/symfony/event-dispatcher/EventDispatcher.php:73)
  at Symfony\Component\EventDispatcher\EventDispatcher->dispatch(object(ViewEvent), 'kernel.view')
     (vendor/symfony/event-dispatcher/Debug/TraceableEventDispatcher.php:168)
  at Symfony\Component\EventDispatcher\Debug\TraceableEventDispatcher->dispatch(object(ViewEvent), 'kernel.view')
     (vendor/symfony/http-kernel/HttpKernel.php:156)
  at Symfony\Component\HttpKernel\HttpKernel->handleRaw(object(Request), 1)
     (vendor/symfony/http-kernel/HttpKernel.php:68)
  at Symfony\Component\HttpKernel\HttpKernel->handle(object(Request), 1, true)
     (vendor/symfony/http-kernel/Kernel.php:198)
  at Symfony\Component\HttpKernel\Kernel->handle(object(Request))
     (public/index.php:25)