api-platform / api-platform

🕸️ Create REST and GraphQL APIs, scaffold Jamstack webapps, stream changes in real-time.
https://api-platform.com
MIT License
8.43k stars 953 forks source link

exception not return jsonld #2558

Open langziyang opened 10 months ago

langziyang commented 10 months ago

API Platform version(s) affected: 3.2.3

Description
exception not return jsonld

How to reproduce
same project,api platform 3.1.29 is ok, when i upgrade to 3.2.3. the exception just return json, not jsonld

image

use Symfony\Component\HttpKernel\Exception\HttpException;
public function process(mixed $data, Operation $operation, array $uriVariables = [], array $context = [])
    {
        throw new HttpException(400, '用户不存在');
    }
hymenoby commented 9 months ago

Have the same issue