src/Leevel/Http/ApiResponse.php
public function unprocessableEntity(?array $errors = null, ?string $message = null, ?string $text = null): IResponse
    {
        if ($this->checkFlowControl()) {
            return $this;
        }

        $this->setStatusCode(static::HTTP_UNPROCESSABLE_ENTITY, $text);

        $this->setData([
            'message' => $this->parseErrorMessage($message), 'errors'  => $errors ?: [],
        ]);

        return $this;
    }
public function unprocessableEntity(?array $errors = null, ?string $message = null, ?string $text = null): IResponse
    {
        if ($this->checkFlowControl()) {
            return $this;
        }

        $this->setStatusCode(static::HTTP_UNPROCESSABLE_ENTITY, $text);

        $this->setData([
            'message' => $this->parseErrorMessage($message), 'errors'  => $errors ?: [],
        ]);

        return $this;
    }
无法处理的实体
请求格式正确，但是由于含有语义错误，无法响应: 422.

@param array  $errors
@param string $message
@param string $text

@return $this