src/Assert.php
public static function assertHasError($document, array $error, bool $strict = true, string $message = ''): void
    {
        self::assertListContainsHash($document, $error, '/errors', $strict, $message);
    }
public static function assertHasError($document, array $error, bool $strict = true, string $message = ''): void
    {
        self::assertListContainsHash($document, $error, '/errors', $strict, $message);
    }
Assert the document contains the supplied error within its errors member.

@param $document
@param array $error
@param bool $strict
@param string $message
@return void