What is the common API endpoint architecture using DTO?
How about:
class PostController extends AbstractController
{
    public function store(PostStoreRequest $request): Response
    {
        $dataStruct = app(PostDataStruct::class)-&gt;fill($request-&gt;validated());
    
        return app(UserPostHandlerInterface::class)-&gt;createPost($dataStruct);
    }
}


PostStoreRequest validates data
PostDataStruct stores contents and has a method that fill all the data for you.
Your code looks a bit like Laravel so I utilized Laravels app container. This way you will have an easier time mocking objects in phpunit.
Within Kernel file forException Handlers, you can define how certain exceptions are handled. i.e. if you call throw new SystemExceptionError('my message') - in the Kernel file state that SystemExceptionError should have HTTP status 500.