44
55use Buzz \Exception \ClientException ;
66use Jobcloud \Kafka \SchemaRegistryClient \Exception \BackendDatastoreException ;
7- use Jobcloud \Kafka \SchemaRegistryClient \Exception \ImportException ;
87use Jobcloud \Kafka \SchemaRegistryClient \Exception \CompatibilityException ;
8+ use Jobcloud \Kafka \SchemaRegistryClient \Exception \ImportException ;
99use Jobcloud \Kafka \SchemaRegistryClient \Exception \IncompatibileAvroSchemaException ;
1010use Jobcloud \Kafka \SchemaRegistryClient \Exception \InvalidAvroSchemaException ;
1111use Jobcloud \Kafka \SchemaRegistryClient \Exception \InvalidVersionException ;
1818use Jobcloud \Kafka \SchemaRegistryClient \Exception \UnauthorizedException ;
1919use Jobcloud \Kafka \SchemaRegistryClient \Exception \UnprocessableEntityException ;
2020use Jobcloud \Kafka \SchemaRegistryClient \Exception \VersionNotFoundException ;
21+ use JsonException ;
2122use Psr \Http \Client \ClientExceptionInterface ;
2223use Psr \Http \Message \RequestInterface ;
2324use Psr \Http \Message \ResponseInterface ;
24- use JsonException ;
2525
2626class ErrorHandler implements ErrorHandlerInterface
2727{
@@ -45,8 +45,11 @@ class ErrorHandler implements ErrorHandlerInterface
4545 * @throws ClientExceptionInterface
4646 * @throws SchemaRegistryExceptionInterface
4747 */
48- public function handleError (ResponseInterface $ response , string $ uri = null , RequestInterface $ request = null ): void
49- {
48+ public function handleError (
49+ ResponseInterface $ response ,
50+ ?string $ uri = null ,
51+ ?RequestInterface $ request = null
52+ ): void {
5053 $ responseContent = json_decode ($ response ->getBody (), true , 512 , JSON_THROW_ON_ERROR );
5154
5255 if (false === isset ($ responseContent ['error_code ' ])) {
0 commit comments