{"record":{"id":"07845371f2b92e23","repo":"filamentphp/filament","slug":"constraint-must-be-an-instance-of-numberconstrai","errorCode":null,"errorMessage":"Constraint must be an instance of [{NumberConstraint::class}].","messagePattern":"Constraint must be an instance of \\[(.+?)\\]\\.","errorType":"exception","errorClass":"LogicException","httpStatus":null,"severity":"error","filePath":"packages/query-builder/src/Constraints/NumberConstraint/Operators/Concerns/CanAggregateRelationships.php","lineNumber":164,"sourceCode":"    protected function getAttributeLabel(): string\n    {\n        $attributeLabel = $this->getConstraint()->getAttributeLabel();\n\n        return __(match ($this->getAggregate()) {\n            static::getAggregateAverageKey() => 'filament-query-builder::query-builder.operators.number.aggregates.average.summary',\n            static::getAggregateMaxKey() => 'filament-query-builder::query-builder.operators.number.aggregates.max.summary',\n            static::getAggregateMinKey() => 'filament-query-builder::query-builder.operators.number.aggregates.min.summary',\n            static::getAggregateSumKey() => 'filament-query-builder::query-builder.operators.number.aggregates.sum.summary',\n            default => $attributeLabel,\n        }, ['attribute' => $attributeLabel]);\n    }\n\n    public function getConstraint(): ?NumberConstraint\n    {\n        $constraint = parent::getConstraint();\n\n        if (! ($constraint instanceof NumberConstraint)) {\n            throw new LogicException('Constraint must be an instance of [' . NumberConstraint::class . '].');\n        }\n\n        return $constraint;\n    }\n}\n","sourceCodeStart":146,"sourceCodeEnd":170,"githubUrl":"https://github.com/filamentphp/filament/blob/53483fa9340e4ec637985fe454ebb58afb92ea24/packages/query-builder/src/Constraints/NumberConstraint/Operators/Concerns/CanAggregateRelationships.php#L146-L170","documentation":"Error \"Constraint must be an instance of [{NumberConstraint::class}].\" thrown in filamentphp/filament.","triggerScenarios":"Thrown at packages/query-builder/src/Constraints/NumberConstraint/Operators/Concerns/CanAggregateRelationships.php:164 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"53483fa9340e4ec637985fe454ebb58afb92ea24","analyzedAt":"2026-08-17T02:06:23.049Z","schemaVersion":2},"datasetVersion":"2026-08-17T04:17:16.089Z"}