We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d06b1a0 commit 6b20075Copy full SHA for 6b20075
1 file changed
src/State/ApiResource/Error.php
@@ -136,6 +136,7 @@ public function __construct(
136
?\Throwable $previous = null,
137
private ?array $meta = null,
138
private ?array $source = null,
139
+ private ?string $description = null,
140
) {
141
parent::__construct($title, $status, $previous);
142
@@ -186,7 +187,12 @@ public function getSource(): ?array
186
187
#[ApiProperty(writable: false, initializable: false)]
188
public function getDescription(): ?string
189
{
- return $this->detail;
190
+ return $this->description ?? $this->detail;
191
+ }
192
+
193
+ public function setDescription(?string $description = null): void
194
+ {
195
+ $this->description = $description;
196
}
197
198
public static function createFromException(\Exception|\Throwable $exception, int $status): self
0 commit comments