You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When there is an Exception in a DataSource, the DataSourceController which extends the AbstractServiceController tries to handle the Exception in AbstractServiceController::processRequest. As last step $this->logger->error($this->throwableStorage->logThrowable($exception), LogEnvironment::fromMethodName(__METHOD__));
is called.
This results in the Error
Call to a member function logThrowable() on null
Exception Code | 0
Exception Type | Error
Thrown in File | /tmp/Flow/Development/SubContextDdev/Cache/Code/Flow_Object_Classes/Neos_Neos_Service_Controller_AbstractServiceController.php
Line | 101
Original File | Packages/Application/Neos.Neos/Classes/Service/Controller/AbstractServiceController.php
Expected Behavior
We see the actual Error (as Json or in the UI) and the Exception is logged sucessfully via $throwableStorage->logThrowable().
Steps To Reproduce
Throw an Error in a DataSource and use it via the DataSourceController / Neos.Ui
Environment
- Flow: 7.3
- Neos: 7.3
- PHP: 8.1
Anything else?
Solution
this seems to be an inheritance problem in combination with dependency injection
… logThrowable() on null
ThrowableStorage is not injected
this seems to be an inheritance problem in combination with dependency injection
in the extended ActionController
we find this
```php
/**
* @var ThrowableStorageInterface
*/
private $throwableStorage;
/**
* Injects the throwable storage.
*
* @param ThrowableStorageInterface $throwableStorage
* @return void
*/
public function injectThrowableStorage(ThrowableStorageInterface $throwableStorage)
{
$this->throwableStorage = $throwableStorage;
}
```
and that doesnt seem to behave as expected in combination with the code in the AbstractServiceController
```php
/**
* @flow\Inject
* @var ThrowableStorageInterface
*/
protected $throwableStorage;
```
solutions are:
- fix the flow DI? (assuming this is a issue)
- rename the variable (what id did now)
- use also AbstractServiceController::injectThrowableStorage / not the @flow\Inject annotation
Is there an existing issue for this?
Current Behavior
When there is an Exception in a DataSource, the DataSourceController which extends the AbstractServiceController tries to handle the Exception in AbstractServiceController::processRequest. As last step
$this->logger->error($this->throwableStorage->logThrowable($exception), LogEnvironment::fromMethodName(__METHOD__));
is called.
This results in the Error
Expected Behavior
We see the actual Error (as Json or in the UI) and the Exception is logged sucessfully via $throwableStorage->logThrowable().
Steps To Reproduce
Throw an Error in a DataSource and use it via the DataSourceController / Neos.Ui
Environment
Anything else?
Solution
this seems to be an inheritance problem in combination with dependency injection
in the extended ActionController
we find this
and that doesnt seem to behave as expected in combination with the code in the AbstractServiceController
so we can do 2 things (assuming that its not a Flow DI Issue pinging @robertlemke )
The text was updated successfully, but these errors were encountered: