We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent fa8abac commit 54e8bc4Copy full SHA for 54e8bc4
2 files changed
src/KeySerialization/JsonSerializer.php
@@ -48,7 +48,7 @@ public function unserialize(string $key): MetricNameWithLabels
48
: [];
49
50
Assert::isArray($labels);
51
- Assert::allStringNotEmpty($labels);
+ Assert::allStringNotEmpty($labels, 'Labels keys and values must be non-empty strings');
52
/** @psalm-var array<non-empty-string, non-empty-string> $labels */
53
54
return new MetricNameWithLabels($name, $labels);
tests/KeySerialization/JsonSerializerTest.php
@@ -98,7 +98,7 @@ public static function unserializationErrorsDataProvider(): iterable
98
99
yield 'empty label' => [
100
'foo|{"bar":""}',
101
- 'Expected a different value than ""',
+ 'Labels keys and values must be non-empty strings',
102
];
103
104
yield 'malformed json' => [
0 commit comments