Added as much additional data as possible to exceptions

This commit is contained in:
Alejandro Celaya
2019-11-27 20:18:36 +01:00
parent fffb2872ef
commit 5266743a0c
9 changed files with 26 additions and 84 deletions

View File

@@ -26,6 +26,11 @@ class NonUniqueSlugException extends InvalidArgumentException implements Problem
$e->title = self::TITLE;
$e->type = self::TYPE;
$e->status = StatusCodeInterface::STATUS_BAD_REQUEST;
$e->additional = ['customSlug' => $slug];
if ($domain !== null) {
$e->additional['domain'] = $domain;
}
return $e;
}